Jump to content
dbinott

Linux guru needed to check my find syntax

1 post in this topic Last Reply

Recommended Posts

I have an unassigned device where NZBGet downloads it's files. For some reason it does not always clean up.

 

So I want to run a user script to clean it up.

I came up with this. Basically says, at least I think it does,  find and delete all files and directories, excluding the . and .. dirs that where last modified 48 hours ago and are empty or size less than 4k.

 

Will this do what I think it will?

 

find /mnt/disks/SSD_01/ . -type d,-noleaf -mtime +1 -empty -size -4k -delete

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.