GNU/Linux Command – RM

rm — ReMove files or directories.

Summary :

rm removes each specified file. By default, it does not remove directories.

Examples :
$ rm myfile -- Remove the myfile from current dir. $ rm f1 f2 f3 -- Remove f1,f2 and f3. $ rm f? -- Remove all files, whose name start with f and followedby single char (fa, fb, fc,..). $ rm f* -- Remove all files, whose name starting with f. $ rm -i myfile -- Ask for interactive conformation (Y/N). $ rm -f myfile -- Force, Ignore nonexistent files. $ rm -d mydir -- Remove the directory. $ rm -r mydir -- Remove the contents of dirs recursively. $ rm -v myfile -- Explain what is being done. $ rm "my file" -- Removing a file, whose name has space. $ rm -- -h -- Remove a file, whose name starting with '-'.
Read : man rm

Advertisements
Tagged with: ,
Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: