The "Remove" command is one of the most dangerous commands in UN*X. Unlike some other operating systems, a removed file or directory is gone forever, there is no "simple" method of un-removing the lost files. Basic usage is:
rm file and directory names E.g. rm test rm test test1 test2 testdir/testfile rm te*
By default "rm" will not remove directories the "-r" (recursive) flag can be used to override this behavior. With the "-r" flag, "rm" command will remove the directory and all files and subdirectories that are under it
rm -r directory
The "-i" switch can be added to the command line so a prompt will ask for confirmation.
rm -i test* rm: remove test1 (yes/no)? yes rm: remove test2 (yes/no)? no rm: remove test3 (yes/no)? yes
a production of
Cadence is a trademark of Cadence Design Systems, Inc., 555 River Oaks Parkway, San Jose, CA 95134.
Please read this DISCLAIMER