LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 10-04-2007, 12:42 PM   #1
Pushfrog98
LQ Newbie
 
Registered: Sep 2003
Location: Illinois
Posts: 4

Rep: Reputation: 0
Finding Files or Directories with Apostrophe in name


I'm not 100% sure where I should look for an answer to this, so I'll create a new thread... I am having an issue with CMS (Joomla) and possibly some file/directory names under my "images" directory... Looking through the Joomla forums, they said my problem could be because of any file or directory with an apostrophe in the name... but I have SEVERAL sub-directories and more files/sub-directories in those...

Is there a command I can type in that will search for all file and/or directory names and print the ones out that have an apostrophe in their name? It has taken me about an hour to sort through 5 of the sub-directories as it is and I have about 25-30 to go... so this would make my job a LOT easier.

Life would be great if it weren't for end-users!!!
 
Old 10-04-2007, 01:22 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,516

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Use:
Code:
find /path/to/images -name "*'*"
to search from /path/to/images downwards.

Regards
 
Old 10-04-2007, 01:25 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
ls -R|grep \'
Works for me

To test this, I also learned how to MAKE a file with "'" in the name:
touch asd\'f
creates file named "asd'f"
 
Old 10-04-2007, 02:44 PM   #4
Pushfrog98
LQ Newbie
 
Registered: Sep 2003
Location: Illinois
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks a bunch! I found 13 files and 4 directories with an apostrophe in the name... hopefully this will fix the problem I am having!!!
 
  


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
finding empty directories with bash Iriel Solaris / OpenSolaris 10 02-18-2016 04:59 AM
wine not finding directories dasy2k1 Linux - Software 2 06-01-2007 06:59 AM
Finding files and directories ihatecomputers Linux - Software 1 03-24-2005 10:29 AM
finding directories w/ certain permissions secular Linux - Security 1 12-28-2004 05:36 PM
finding empty directories... PokerFace Linux - General 2 10-16-2002 09:23 AM


All times are GMT -5. The time now is 02:13 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration