Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-05-2008, 02:12 PM   #1
Registered: May 2008
Location: Wisconsin
Distribution: Fedora, Ubuntu, RHEL, AIX6
Posts: 33

Rep: Reputation: 0
Metacharacters appearing in file names?

Hi, Sorry if this question has been asked before, but I couldn't find any threads to help me. I am VERY new to Linux and was just wondering how the heck I can delete a file that has a metacharacter or two in the file name? I am not sure how it even got created. When I do an ls on the directory the file appears as: ??? ?m??7?.log

I can't do anything with this file and I believe it is causing a problem with completing the backups of the system.

Any suggestions?

PS I am running RHEL AS release 4 (Nahant Update 2) on this box.
Old 05-05-2008, 03:29 PM   #2
Senior Member
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
Try creating a temp directory under the directory containing the file. Then mv *.log into that temp directory. Now, move everything BUT that file back to the current directory. Then "rm -rf temp". If you have a lot of .log files, you may want to use a while loop or something like:

find temp -name \[a-zA-Z\]\*.log -exec mv {} . \;
Remember to "ls -la temp" to make sure there are no other files left.



Last edited by forrestt; 05-05-2008 at 03:32 PM.
Old 05-05-2008, 03:56 PM   #3
LQ Guru
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 6,147

Rep: Reputation: Disabled
Sounds like filesystem corruption. I'd boot from a Linux CD and run fsck.
Old 05-06-2008, 07:25 AM   #4
Registered: May 2008
Location: Wisconsin
Distribution: Fedora, Ubuntu, RHEL, AIX6
Posts: 33

Original Poster
Rep: Reputation: 0
Thanks for the suggestions. I ended up "cheating". I just used WinSCP, navigated to the directory with the mysterious file, and deleted it that way.

Thanks again though!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to find if a matching file exist from a list of possible file names wit_273 Linux - General 5 10-25-2007 09:47 AM
Analysing string containing metacharacters doug.mm0bja Linux - Newbie 4 08-29-2007 05:58 PM
www-data group not appearing in file permissions tab nick1 Ubuntu 1 05-01-2006 11:48 AM
metacharacters "The Pipe command mikeinanson Linux - Newbie 4 03-11-2006 12:36 PM
Unicode file names!! shivasa Linux - General 3 10-16-2003 10:04 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:02 PM.

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