Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple - Move file 2

Status
Not open for further replies.

mrn

MIS
Apr 27, 2001
3,993
GB
How do I move a file being with -

mv -afilename X-afilename



Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
try

mv -- -afilename X-afilename

HTH,

p5wizard
 

# mkdir ./-afilename

# ls -al
total 40
drwxr-xr-x 2 root system 512 Sep 08 14:57 -afilename
drwxr-xr-x 3 root system 512 Sep 08 14:57 .
drwxrwxrwt 14 bin bin 11264 Sep 08 14:57 ..

# mv ./-afilename A-afilename

# ls -al
total 40
drwxr-xr-x 3 root system 512 Sep 08 14:58 .
drwxrwxrwt 14 bin bin 11264 Sep 08 14:57 ..
drwxr-xr-x 2 root system 512 Sep 08 14:57 A-afilename
 
Well you both helped me out of a hole, so thanks to both.

Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top