Ancestors

Written by Paul on 2025-01-27 at 18:08

Finally managed to fix an annoying problem whereby Nextcloud was sometimes running twice on one of my machines, and had double-downloaded every file (but not uploaded them, so my desktop had two copies of everything but the server didn't, and the duplication only happened on one account). This used up 8GB of space!

I will blog about it at some point, but the root cause was Nextcloud was listed to launch twice at startup, although it only did maybe 10% of the time. (1/2)

[#]Linux #Nextcloud

=> More informations about this toot | More toots from pwaring@fosstodon.org

Toot

Written by Paul on 2025-01-27 at 18:09

The command I ran to remove the duplicates was:

find . -name '..~' | xargs -d '\n' rm

The -d '\n' argument to xargs tells it to only use newlines to separate paths, otherwise it tries to use any whitespace and this breaks when you have paths with spaces in them. (2/2)

=> More informations about this toot | More toots from pwaring@fosstodon.org

Descendants

Written by Jonathan Dowland on 2025-01-27 at 18:12

@pwaring you can also tell find to -delete

=> More informations about this toot | More toots from jmtd@pleroma.debian.social

Written by Paul on 2025-01-27 at 18:12

@jmtd Good point, I'd forgotten about that (some of my server backup scripts use -delete).

=> More informations about this toot | More toots from pwaring@fosstodon.org

Written by Attractive Nuisance on 2025-01-27 at 18:18

@pwaring The easy no-brainer way to do that escape thing is:

find -print0 | xargs -0

This will also work on filenames with newlines in them which are valid on *nix but not common.

=> More informations about this toot | More toots from diffrentcolours@tech.lgbt

Written by Lars Wirzenius on 2025-01-27 at 18:22

@diffrentcolours @pwaring At least with GNU f}nd the "-delete" operation may be easier:

find -name whatever-pattern -delete

Run first without -delete to make sure you have the right pattern for the name.

=> More informations about this toot | More toots from liw@toot.liw.fi

Written by JP Mens on 2025-01-28 at 11:27

@pwaring safer, imo, is `find ... -print0 | xargs -0 ...' which ensures paths are 0-terminated

edit: and find can delete itself (which I always forget because #oldfart)

=> More informations about this toot | More toots from jpmens@mastodon.social

Proxy Information
Original URL
gemini://mastogem.picasoft.net/thread/113901657307005452
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
343.379118 milliseconds
Gemini-to-HTML Time
2.144913 milliseconds

This content has been proxied by September (3851b).