Dear friends,
When I list the files in my machine with SUN solaris 5.8 I can see an unidentified file like.....
-rwxr-xr-x 1 isos staff 566952 Oct 12 2001 sendapi*
-rw-r--r-- 1 isos staff 3471 Oct 12 2001 set_environ.inst
-rw-r--r-- 1 isos staff 1534 Oct 12 2001 setenv.site
-r-xr-xr-x 1 isos staff 6795 Oct 12 2001 setup*
-rw-rw-r-- 1 isos staff 28718 Mar 29 18:02

-rw-r--r-- 1 isos staff 4710 Sep 12 2001 slot3.cfg
-rwxr-xr-x 1 isos staff 753 May 5 2001 snmpd.sh*
-rwxr-xr-x 1 isos staff 315672 Oct 12 2001 sockclnt*
-rwxr-xr-x 1 isos staff 189412 Oct 12 2001 sockserv*

the space as shown above is the file name which is 28 MB. I dont know how this has been created and how to access this file!!!
Can neone help me to find out what is inside and way to delete?

Regards,
Shankar.

Recommended Answers

All 5 Replies

To access the file put a \ before the space so that it will read "\ " (without the quotes of course) Then, you can rm/file/vi/etc. the file and figure out what it is. Special characters are often needed to be prepended with a \ in order to be used from the CLI/Regexps/etc.

HI, thats fine,
but I dont know how many spaces to be included cos single space is not working!!! But i came across some other way like ftp..i have moved that file to my windows machine then easily renamed it then put back in to the solaris machine!!!


Thanx a lot

In the future, if your shell supports tab completion (assuming that you only have one file with a leading space) you can first type the "\ " and then using tab or escape, can automatically complete the file name for you.

The best way to manipulate a file with a name that consists of an arbitrary amount of whitespace is to reference the file by it's inode number.

Find the file's inode number with "ls -i" then use the find command to remove it using the inode number: "find -inum <inode number> -exec rm {} \;"

You might also want to add a "-maxdepth 1" predicate to the above find command to limit the search to your current working directory.

Yeah, thanx for the idea.
Chao,
Shankar

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.