Does this remove all the files
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.
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