The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to adjust spacing stevefox Shell Programming and Scripting 4 03-29-2007 05:19 AM
character spacing issue wxornot Shell Programming and Scripting 1 03-08-2006 05:22 PM
Help with multiple file rename - change case of part of file name steve7 UNIX for Dummies Questions & Answers 7 06-30-2005 10:41 AM
spacing question vivekshankar UNIX for Dummies Questions & Answers 7 05-22-2005 07:34 AM
unix rename signprint UNIX for Dummies Questions & Answers 3 07-14-2004 06:59 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 08-09-2002
Registered User
 

Join Date: Nov 2001
Location: Milton Keynes, UK
Posts: 1
Question How Do I rename a unix file contianing spacing?

How can I rename a unix file that has a spacing in in the charactyers? For example, I want to rename or move a file called "My OldFile.txt" to "MyNewFile.txt" or "My_New_file.txt"

Please help
Forum Sponsor
  #2  
Old 08-09-2002
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,667
mv "My OldFile.txt" MyNewFile.txt
  #3  
Old 08-10-2002
Registered User
 

Join Date: Oct 2001
Location: Atlanta
Posts: 9
If I understand your question correctly it would be:
mv My\ File\ .txt My_File.txt

jiin
  #4  
Old 08-12-2002
Registered User
 

Join Date: Jun 2002
Location: Chennai, India
Posts: 110
Now tell me how to create a file with spacing..

If i give

touch my old.txt or
vi my old.txt

then, the shell interprets it as two seperate files.. one as my and the other as old.txt....


How can one succeed in creating a file with spaces????


Thanks,
Nisha
  #5  
Old 08-12-2002
Registered User
 

Join Date: Nov 2001
Location: New Zealand
Posts: 333
Exactly the same

vi "my file"
__________________
Pete
  #6  
Old 08-12-2002
Registered User
 

Join Date: Jun 2002
Location: Chennai, India
Posts: 110
Working fine Peter....


Thanks,
Nisha
  #7  
Old 08-19-2002
Registered User
 

Join Date: Oct 2001
Location: Bangalore
Posts: 95
Nisha,

U can also do

vi my\ old.txt

Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 02:51 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0