[SLE] Moving filename with dash (-filename-)
Hi, How do you move or copy a filename with a dash in it? The filename lets say is: -file_name- when I try a mv "-file_name-" filename mv \-file_name\- filename mv *file_name* filename mv '-file_name-' filename it thinks the first character of the filename (which is a dash) is giving a parameter over to the move command, and it outputs something like mv: illegal option -f mv: illegal option -l mv: illegal option -e etc, etc Any ideas? I don't have midnight commander installed on this system, and I would really like to know how to do this on the command line using the standard Unix tools. Thanks, Jack -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
Hi, On Mon, Feb 07, 2000 at 07:31 -0600, Jack Barnett wrote:
How do you move or copy a filename with a dash in it? The filename lets say is:
-file_name-
You can use the special option `--' to tell mv that everything following it should not be considered an option: mv -- -file_name- file_name Ciao, Stefan -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
On Tue, 08 Feb 2000, Stefan Troeger wrote:
Hi,
On Mon, Feb 07, 2000 at 07:31 -0600, Jack Barnett wrote:
How do you move or copy a filename with a dash in it? The filename lets say is:
-file_name-
You can use the special option `--' to tell mv that everything following it should not be considered an option:
mv -- -file_name- file_name
You can also use "mv ./-file_name ./-new_file_name"
-Nick
+-------------------------------+--------------------------------------------+
| /`--_ Nicholas R LeRoy | In a world without fences, Who needs Gates?|
|{ }/ Norland Corporation | ---- Experience Linux! ---- |
| \ * / W6340 Hackbarth Rd | http://www.linux.org | http://www.ssc.com |
| |___| Fort Atkinson, WI 53538 +--------------------------------------------+
| nick.leroy@norland.com | #include
participants (3)
-
jbarnett@axil.netmate.com
-
nick.leroy@norland.com
-
stefan.troeger@wirtschaft.tu-chemnitz.de