Automatically delete empty QubesIncoming subdirectories

Original forum link
https://forum.qubes-os.org/t/21513
Original poster
Solène R
Editors
rustybird
Created at
2023-10-16 08:48:54
Last wiki edit
2023-11-20 12:01:06
Revisions
6 revisions
Posts count
42
Likes count
27

Hi,

This is a simple guide, but I'm quite happy with this setup so I'm sharing it here 🙂

I was bored to have many QubesIncoming subdirectories in my qubes, after receiving a file I usually move it from there, but I always forget to clean the empty directory.

This command line to add in /rw/config/rc.local will automatically remove all empty sub directories, but not remove /home/user/QubesIncoming itself because it's it's bookmarked in the file browser, it would disappear when deleted.

test ! -d /home/user/QubesIncoming || find '/home/user/QubesIncoming/' -mindepth 1 -type d -exec rmdir '{}' \;