Does this remove all the files
Printable View
Does this remove all the files
Depends on the permissions of files.
rm * will remove all the files in a given directory if delete permissions are there for the files.
Its a very dangerous command
if we give rm -rf then it deletes the hole contants including subdirectories.
be aware while using rm.
rm -rf * will work:)
what will happen if rm -rf is run from root directory.
[QUOTE=bathija;30431]what will happen if rm -rf is run from root directory.[/QUOTE]
It will delete everything. Don't try this.
rm * will delete all the files in sufficient permissions are there.bt anway it will not delete the directories directly.
rm * ---- > Delete's all the files in the current directory.
rm -r * ---> Delete's both the files and the directories in the current directory.
Pls note the above commands don't delete the Hidden Files.
Hidden files are the files which start with .filename , inorder to view the file we need to use the ls -a option.
To delete these files also use a . , i.e:
rm *.*
Note:- All above commands will work only if u have sufficient privileges to do so :)
[QUOTE=smita76;17915]Does this remove all the files[/QUOTE]
Try to read the man page first, & understand, instead of waiting for 5 days to get the 1st response.