LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   how to expand wildcards in a path with spaces? (https://www.linuxquestions.org/questions/linux-general-1/how-to-expand-wildcards-in-a-path-with-spaces-382486/)

sts 11-12-2005 01:32 PM

how to expand wildcards in a path with spaces?
 
I don't know whether this belongs here or in the newbie section but I'm asking here because I don't need to be coddled ;). Normally I wouldn't use spaces at all but I'm manipulating files from Windows and they need to return there in the same state.

At the moment, I'm trying to do the simplest of things (in this case in a PHP script) --

rm "folder with space/*.wildcardfiles"

I know I can cd to the directory first, but I wanted to know for future reference whether there's a more elegant way to work with these files.

Thanks!

homey 11-12-2005 01:50 PM

I like to use find. For example:
Code:

find /home/"The Images Folder" -type f -name '*.mp3' -exec rm {} \;


All times are GMT -5. The time now is 04:01 AM.