On the Linux command line, I want to delete 3 files in one command, how would I do it?
For instance, I want to delete:
public_html.tar.gz
dbapp.sql
dbwp.sql
On the Linux command line, I want to delete 3 files in one command, how would I do it?
For instance, I want to delete:
public_html.tar.gz
dbapp.sql
dbwp.sql
rm takes as many arguments as you pass it. Up to the maximum command line length, usually 32,760 odd characters.
In this case:
rm public_html.tar.gz dbapp.sql dbwp.sql
To forcibly delete, without confirmation prompts (potentially dangerous!)
rm -f FILE1 FILE2 ...
See also: man 1 rm
Just list them all in a singe line command using rm -f. It won't restrict you to a single file entry per delete. The -f options ensures it doesn't prompt you when removing a file.
rm public_html.tar.gz dbapp.sql dbwp.sql
-ioption. It could be that you have an alias forrmtorm -i; trytype rmto check,unalias rmto temporarily remove the alias, and look in your shell initialization scripts (the~/.bashrcfile`) for removing it permanently. – u1686_grawity Feb 21 '14 at 15:10--force/-foption. – Daniel B Feb 21 '14 at 15:11