Site icon LinuxCommands.site

How to remove directory or file using the command line in Linux system

linux rm command can remove directory or file.

If the permissions of the file do not permit writing, and the standard input device is a terminal, the user is prompted (on the standard error output) for confirmation. About linux file properties and permissions.

syntax

rm [-dfiPRrvW] file ...

options

example

➜ rm -v test 
➜ rm test 
➜ rm -f test 
➜ rm -i test
➜ rm -r test 
➜ rm -rf test 
➜ rm -R test 
➜ rm -rf test-*

Recommended Posts:

Linux common commands tutorial and use examples
GNU sed syntax and sed examples
Awk tutorial: awk syntax and awk examples
linux chmod command and linux chown command usage
linux iostat syntax and iostat examples
linux grep command and grep examples
linux top syntax and top examples

Exit mobile version