Home > Bookmarks, Hosting, Linux > Remove All Files – Linux Command

Remove All Files – Linux Command

August 31st, 2008 Leave a comment Go to comments

to remove all files from the current directory and all subdirectories do:

rm -r *.*

if you get “Argument list too long – Linux” , view this: /bin/rm Argument list too long – Linux

to remove file types .tmp from the current directory and all subdirectories do:

rm -r *.tmp

To remove directories and all subdirectories with a specific name do

rm -r mydir

Linux / Unix Command: rm
rm [OPTION]… FILE…
rm removes each specified file. By default, it does not remove directories. If a file is unwritable, the standard input is a tty, and the -f or –force option is not given, rm prompts the user for whether to remove the file. If the response does not begin with `y’ or `Y’, the file is skipped.

  1. No comments yet.
  1. No trackbacks yet.
GoCache - ByREV-Cache v1.0 - live served in : 0.13758 sec (gzip)