-   Linux - Newbie (
-   -   Finding Files or Directories with Apostrophe in name (

Pushfrog98 10-04-2007 11:42 AM

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!!!

bathory 10-04-2007 12:22 PM


find /path/to/images -name "*'*"
to search from /path/to/images downwards.


pixellany 10-04-2007 12:25 PM

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"

Pushfrog98 10-04-2007 01:44 PM

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!!!

All times are GMT -5. The time now is 11:59 AM.