LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices



Reply
 
Search this Thread
Old 05-05-2008, 03:12 PM   #1
kkoene
Member
 
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, 04:29 PM   #2
forrestt
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:

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

HTH

Forrest

Last edited by forrestt; 05-05-2008 at 04:32 PM.
 
Old 05-05-2008, 04:56 PM   #3
Emerson
Senior Member
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~
Posts: 3,177

Rep: Reputation: Disabled
Sounds like filesystem corruption. I'd boot from a Linux CD and run fsck.
 
Old 05-06-2008, 08:25 AM   #4
kkoene
Member
 
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!
 
  


Reply


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 10:47 AM
Analysing string containing metacharacters doug.mm0bja Linux - Newbie 4 08-29-2007 06:58 PM
www-data group not appearing in file permissions tab nick1 Ubuntu 1 05-01-2006 12:48 PM
metacharacters "The Pipe command mikeinanson Linux - Newbie 4 03-11-2006 01:36 PM
Unicode file names!! shivasa Linux - General 3 10-16-2003 11:04 PM


All times are GMT -5. The time now is 05:12 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration