rm -rf all files and all hidden files without . & .. error
rm -rf /some/path/* deletes all non-hidden files in that dir (and subdirs).
rm -rf /some/path/* deletes all non-hidden files in that dir (and subdirs).
I need to remove files older than 3 days with a cron job in 3 different directories. (these 3 directories are children of a parent directory /a/b/c/1 & /a/b/c/2 & /a/b/c/3) Can this be done with one line in the crontab?
I wanted to delete some package in my home file, but the filename was too long (google-chrome-stable_current_i386.deb). So, I decided to use the command ls|grep chrome|rm to pipe the files to grep to filter out the chrome file, and then remove it. It didn’t work, so I would like to see how I can do this.
I have a lot of files and folders in a specific folder and I want to delete all of them; however, I wanted to keep files X, Y, and Z.
chmod 777 -R /mnt rm -rf /mnt/* rm: cannot remove 'omitted': Read-only file system rm: cannot remove 'omitted': Read-only file system Please show me how I can do this? Answers: Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please … Read more
I was running a Python script that malfunctioned and used sudo to create a file named >.
As everyone knows, these are two deadly unix commands that both tell a machine to commit suicide. But what is the difference between the two? The first one deletes the root directory, while the second one deletes everything in it. Both are equally bad, but will the first one delete the filesystem because it deletes the root directory itself? What is the difference?