Top "Rm" questions

rm is a basic UNIX command used to remove files, directories, and other items from the filesystem.

Error 'rm: missing operand' when using along with 'find' command

I see that this question is getting popular. I answered my own question below. What says Inian is correct and …

bash rm operand
Recursively unzip files and then delete original file, leaving unzipped files in place from shell

I've so far figured out how to use find to recursively unzip all the files: find . -depth -name `*.zip` -exec /…

bash unzip rm
Delete directories older than X days

so I have looked at every single script on here regarding deleting directories older than 14 days. The Script I wrote …

linux bash directory crontab rm
Restore deleted file not staged in git

I accidentally removed the entire directory of my source code...with a nice rm -r. I know, really bad; but …

git git-checkout rm git-revert git-rm
Bash script to remove all files and directories except specific ones

I am trying to write a very simple Bash shell script that will cd in a specific directory, it will …

bash shell rm
How do I delete folders using regex from Linux terminal

Say I have folders: img1/ img2/ How do I delete those folders using regex from Linux terminal, that matches everything …

regex linux find rm
How to avoid "No such file or directory" Error for `make clean` Makefile target

I have a Makefile that defines a .PHONY clean target for cleaning up .o files and executables, that target looks …

linux makefile rm
Remove all files that does not have the following extensions in Linux

I have a list of extensions: avi,mkv,wmv,mp4,mp5,flv,M4V,mpeg,mov,m1v,m2v,3…

linux ssh find rm
Difference between 'find -delete' and 'rm -rf'?

I want to delete files from a specific directory recursively. So, I have used find . -wholename "*.txt" -delete We can …

unix delete-file rm
Why does the rm command not remove the file?

When i today accessed my Ubuntu 16.04 server and wanted to remove the file "test2" it was simply not deleted! I …

bash shell ubuntu-16.04 rm