About 1,500,000 results
Open links in new tab
  1. What is the difference between rm -r and rm -f? - Super User

    Sep 20, 2016 · From manual: -f, --force ignore nonexistent files, never prompt -r, -R, --recursive remove the contents of directories recursively Though this options description is different, …

  2. linux - Remove file without asking - Super User

    Oct 12, 2011 · How can I remove a file without asking the user if he agrees to delete the file? I am writing shell script and use rm function, but it asks "remove regular file?" and I …

  3. Saying 'yes to all' using rm -i - Super User

    Mar 27, 2011 · rm -i * just to make sure that I'm okay with the files that I am removing. So this will ask me for each file. After a few files, suppose I realize it's exactly what I wanted to remove. …

  4. How do I make rm not give an error if a file doesn't exist?

    Jun 12, 2015 · So rm will warn you if you try to delete a file you don't have write permissions on. This is allowed if you have write permissions on the directory but is a little weird, which is why …

  5. bash - Delete files with regular expression - Super User

    Mar 15, 2017 · I Tried to delete files that starts with A and ends with 2 numbers but It doesn't do a thing. What I tried: rm ^A*[0..9]2$ Where am I wrong?

  6. What is the equivalent of rm -rf in Powershell? - Super User

    As we all know, on a *nix system, rm -rf some_directory removes some_directory and all files beneath it recursively, without asking for confirmation. What is the equivalent of this command in

  7. linux - Delete matching files in all subdirectories - Super User

    Feb 22, 2010 · Remove all *.swp files underneath the current directory, use the find command in one of the following forms: find . -name \*.swp -type f -delete The -delete option means find will …

  8. rm: cannot remove `dir-name': Directory not empty - Super User

    Dec 20, 2023 · rm: cannot remove `dir-name': Directory not empty Ask Question Asked 1 year, 10 months ago Modified 1 year, 10 months ago

  9. linux - In a bash shell, is `rm -rf ./*` better/safer than `rm -rf ...

    Jan 14, 2023 · The better solution is rm -rf ./*. Shell globs (wildcards) are expanded before the command is executed, and there is no significant restriction on file names, which means that …

  10. How to remove all files starting with a certain string in Linux

    Oct 2, 2012 · I need to find all files starting with the name NAME in a directory tree and remove all these files using one shell command.