Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 11-12-2005, 01:32 PM   #1
LQ Newbie
Registered: Nov 2005
Posts: 1

Rep: Reputation: 0
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.

Old 11-12-2005, 01:50 PM   #2
Senior Member
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 59
I like to use find. For example:
find /home/"The Images Folder" -type f -name '*.mp3' -exec rm {} \;


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Handling wildcards... artificialGekko Linux - General 5 03-24-2005 08:29 PM
CLI wildcards ShakyJake Linux - Newbie 4 02-28-2005 03:42 PM
Wildcards dazdaz Linux - Newbie 3 01-23-2005 05:33 AM
using rsync - one of the folders in path has spaces??? jgruss Linux - Networking 10 07-07-2004 07:27 PM
Wildcards in kernel Squall Linux - General 1 04-20-2004 05:22 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:01 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