LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-01-2008, 05:31 PM   #1
gabosdenes
LQ Newbie
 
Registered: Jan 2008
Posts: 8

Rep: Reputation: 0
Really special caracter in filename


I've read all the threads about how to remove files with special names, but they just don't work for me.

ls output:
# ls
/bin/ls: ERIEBLKB.TF: No such file or directory

# rm ERIEBLKB.T^TF
rm: cannot remove `ERIEBLKB.T\024F': No such file or directory

# rm ERIEBLKB.T^TF
rm: cannot remove `ERIEBLKB.T^TF': No such file or directory

# rm -rf ERIEBLKB*
executes without any error message but the file isn't removed

OS: Suse 9.2
Any help would be appreciated

Gabos Denes
 
Old 01-01-2008, 05:38 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
There isn't anything special about the underscore character.

Check the permissions on the file, including the facl's and the extended attributes.
 
Old 01-01-2008, 06:08 PM   #3
gabosdenes
LQ Newbie
 
Registered: Jan 2008
Posts: 8

Original Poster
Rep: Reputation: 0
Underscore caracter? that's not an underscore caracter. And i can't list any attributes.

# ls -al
/bin/ls: ERIEBLKB.TF: No such file or directory
total 38
drwxrwx--- 2 nobody nogroup 80 Dec 14 13:08 .
drwxrwx--- 29 nobody nogroup 39040 Apr 30 2005 ..
 
Old 01-01-2008, 07:16 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Between the T and F is an underscore character.

Where is this file, because the owner group are for nobody:nogroup.

Also, cutting and posting in between code blocks will present more accurate info.

Try auto-completion. In console, you can also highlight the name, copy it and then past it as an argument to the rm command.

Use "getfacl" to list the posix acls. Use lsattr to list special attributes such as "immutable".
If the immutable bit is set, even root can't delete a file. The "chattr" command needs to be used to clear the immutable bit first.
 
Old 01-01-2008, 07:35 PM   #5
gabosdenes
LQ Newbie
 
Registered: Jan 2008
Posts: 8

Original Poster
Rep: Reputation: 0
The permissions are set to nobody:nogroup because it's on a samba share.
Using autocomplete it completes the filename to : ERIEBLKB.T^TF
I tried pasting this to the rm command and i get:
# rm ERIEBLKB.T^TF
rm: cannot remove `ERIEBLKB.T^TF': No such file or directory

getfacl returns:
# getfacl ERIEBLKB.T^TF
getfacl: ERIEBLKB.T\024F: No such file or directory

Issuing a ls in that directory lists:
# ls -al
/bin/ls: ERIEBLKB.TF: No such file or directory
total 38
drwxrwx--- 2 nobody nogroup 80 Dec 14 13:08 .
drwxrwx--- 29 nobody nogroup 39040 Apr 30 2005 ..


And this time is't a different caracter than using autocomplete. In the terminal i see no caracter, but pasted here in opera 9.24 appears as a square.

I tried using wildcard
# rm -rf ERIEBLKB*
executes without any error message but the file isn't removed

Last edited by gabosdenes; 01-01-2008 at 07:37 PM.
 
Old 01-01-2008, 11:45 PM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
List the files in the directory with the -i option to list the inodes. "ls -li"
Then use find to locate a file in the directory with that inode number; and rm the file found in the find command.
Use the inode of your file instead of 12345 in this example from the "find" info manual:
Code:
find . -maxdepth 1 -inum 12345 -okdir rm -f '{}' \;

Last edited by jschiwal; 01-01-2008 at 11:46 PM.
 
Old 01-02-2008, 06:25 AM   #7
gabosdenes
LQ Newbie
 
Registered: Jan 2008
Posts: 8

Original Poster
Rep: Reputation: 0
I can't list the file:

# ls -li
/bin/ls: ERIEBLKB.TF: No such file or directory
total 38
303611 drwxrwx--- 2 nobody nogroup 80 Dec 14 13:08 .
303357 drwxrwx--- 29 nobody nogroup 39040 Apr 30 2005 ..
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert static library (Filename.a) to dynamic shared object (filename.so) afx2029 Linux - Software 4 08-17-2007 06:07 AM
Trying to delete a filename with special characters Harry Seldon Linux - General 11 03-20-2007 01:31 PM
caracter devices phil1361 Slackware 2 12-26-2005 02:10 PM
write a caracter from it's ASCII code xStef Linux - General 2 08-18-2003 09:27 AM
caracter set c0c0deuz Linux - Newbie 3 11-01-2001 11:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration