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!

Deleting an AIX File which has space and & in name

Status
Not open for further replies.

jahirs

MIS
Jan 22, 2003
12
US
Hi,

I ftp'd some data files from Win to AIX, which has & and space in the file name.
How can I delete/open those files.

Thanks in Advance.

Jaheer
 
HI,

1.you can use tcsh ,start the file name ,use <tab> to let the system to complete the name

or

2.cat file\ space\ name
&quot;\&quot; will tell the syetm to use space as part of the name

or

3.cat 'file space name'

3.

&quot;Long live king Moshiach !&quot;
 
You can delete these files with imbedded spaces and/or special characters by using rm -i * carefully.

You be prompted remove <filename> ? and you simply answer (n)o until you get to the file(s) that you want to delete.

Cumbersome if there are many files to get through to get to your problem file(s) but it's a simple solution to your problem.
 
Thanks guys.

rm -i *pattern* worked.

Very much thanks
 
I tried to create a file named &quot;& goofy&quot; by issuing the command &quot;echo a > \&\ goofy&quot; and it worked well
Then i tried to remove it by issuing &quot;rm \&\ goofy&quot; and it worked fine too
The problem is in the special-character interpretation which can be avoided by quoting the special character
 
I had a file that looked like:
{print }
I don't know how it got there, and I couldn't delete it. After reading this thread I tried:
rm -i *print*
which worked as advertised.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top