Originally Posted by ASTRAPI
You mean like this?
rm -i /usr/local/src/myfolder/file1.txt image.jpg info.html another.txt
I want to delete all files at once...
No, you have to repeat the whole "/blah/blah/blah/<filename>" for each single file, otherwise the command will look only in the directory in which you're located when executing the command.
Therefore if you want to delete all those files using a single command you'll have to execute:
rm -i /usr/local/src/myfolder/file1.txt /usr/local/src/myfolder/image.jpg /usr/local/src/myfolder/info.html /usr/local/src/myfolder/another.txt
To be more precise, the command ("rm" in your case, but this is valid for all other commands as well) always perform the action only on exactly what is specified.
let's say that in your current directory you have 2 files called "something1.txt" and "something2.jpg".
When you issue the command "rm *" to wipe out everything from your current directory, the "shell" (maybe the "bash" shell in your case?) interprets the "*" character BEFORE the command is executed and replaces it by all the filenames that are present in your current directory.
Therefore, when the command is executed, it is executed by running "rm something1.txt something2.jpg" and not as "rm *".
This is a little bit linked to what you were asking.