28
votes
5answers
879 views

Deleting millions of files

I had a dir fill up with millions of gif images. Too many for rm command. I have been trying the find command like this: find . -name "*.gif" -print0 | xargs -0 rm Problem is, it bogs down my ...
1
vote
1answer
227 views

Use 'find' to find and delete large files of a certain type

I am trying to find and rm -rf large files in RHEL, but what I would expect from this command that would give me purely the file directories, feeding them into rm -rf, it is not removing them. My FU ...
2
votes
1answer
275 views

Removing a directory containing a file using find

I'm searching a list of directories for certain files and I want to delete the directory that the file is in. This is what I'm trying: find /converter/storage/unmatched/ -size -4b -name '*.mp3' ...
0
votes
2answers
318 views

recursively delete but keep .gitignore file

I've been trying out several methods from SU but I have been unable to do this: I got a folder (example: /var/www/tmp/) which contains several files and directories. I'd like to delete all the files ...
0
votes
2answers
83 views

How to delete a file after processing

I am using mp3splt to split all the .mp3 files under a directory, including subdirectories, into 30 minute slices. find -name *.mp3 -print0 | xargs -0 mp3splt -t 30.00 -o @f_@m@s What is the best ...