Babak K. Shandiz
Babak K. Shandiz's Blog

Babak K. Shandiz's Blog

Living in the Shell #13; rm (Delete Files/Directories)

Living in the Shell #13; rm (Delete Files/Directories)

Babak K. Shandiz's photo
Babak K. Shandiz
ยทDec 12, 2021ยท

1 min read

rm ๐Ÿ’ฃ

Removes files or directories.

๐Ÿ’€ Removal is irreversible.

Remove a single file

rm some-file

Remove multiple files

rm first-file second-file third-file

Remove a directory -r

rm -r my-dir

Set to prompt before every removal -i

rm -ri my-dir

Set to suppress any interaction/error -f

rm -rf my-dir my-non-existing-dir
ย 
Share this