Automatically delete empty QubesIncoming subdirectories revisions

Go back to topic: Automatically delete empty QubesIncoming subdirectories

  1. v7 anchor; v7 full version
  2. v6 anchor; v6 full version
  3. v5 anchor; v5 full version
  4. v4 anchor; v4 full version
  5. v3 anchor; v3 full version
  6. v2 anchor; v2 full version

Revision #7

Edited on
2023-11-20
Edited by user
solene
test ! -d /home/user/QubesIncoming || find "${path}" -depth -type d -empty -delete test ! -d /home/user/QubesIncoming || find '/home/user/QubesIncoming/' -mindepth 1 -type d -exec rmdir '{}' \;

Revision #6

Edited on
2023-11-20
Edited by user
solene
test ! -d /home/user/QubesIncoming || find '/home/user/QubesIncoming/' -mindepth 1 -type d -exec rmdir '{}' \; test ! -d /home/user/QubesIncoming || find "${path}" -depth -type d -empty -delete

Revision #5

Edited on
2023-10-16
Edited by user
solene
test ! -d /home/user/QubesIncoming || find /home/user/QubesIncoming/ -mindepth 1 -type d -exec rmdir {} \; test ! -d /home/user/QubesIncoming || find '/home/user/QubesIncoming/' -mindepth 1 -type d -exec rmdir '{}' \;

Revision #4

Edited on
2023-10-16
Edited by user
rustybird
test ! -d /home/user/QubesIncoming || find /home/user/QubesIncoming/ -mindepth 1 -type d -exec rmdir {} + test ! -d /home/user/QubesIncoming || find /home/user/QubesIncoming/ -mindepth 1 -type d -exec rmdir {} \;

Revision #3

Edited on
2023-10-16
Edited by user
rustybird
test ! -d /home/user/QubesIncoming || find /home/user/QubesIncoming/ -mindepth 1 -maxdepth 1 -type d -exec rmdir {} + test ! -d /home/user/QubesIncoming || find /home/user/QubesIncoming/ -mindepth 1 -type d -exec rmdir {} +

Revision #2

Edited on
2023-10-16
Edited by user
rustybird
test -d /home/user/QubesIncoming && find /home/user/QubesIncoming/ -type d -mindepth 1 -exec rmdir {} \; test ! -d /home/user/QubesIncoming || find /home/user/QubesIncoming/ -mindepth 1 -maxdepth 1 -type d -exec rmdir {} +