Results 1 to 5 of 5
hi
hope you are well...the thing is i want to know if i have a folder named whose absolute path is as follows
/home/someuser/this folder name has spaces/
how would ...
- 01-12-2008 #1Just Joined!
- Join Date
- Aug 2007
- Posts
- 15
using "find" to locate files in a folder when folder name has spaces
hi
hope you are well...the thing is i want to know if i have a folder named whose absolute path is as follows
/home/someuser/this folder name has spaces/
how would i use find to look for a file abc.txt in this folder meaning
if i use
find /home/someuser/this folder name has spaces/ -wholename="*abc.txt"
i get errors like
find: /home/someuser/this: no such file or directory
find: folder :no such file or directory
..
..
...
..
i know the error becuase of the fact that the name has spaces can anyone please suggest how to overcome this i have tried doing
find "/home/someuser/this folder name has spaces/" -wholename="*abc.txt"
no results
find '/home/someuser/this folder name has spaces/' -wholename="*abc.txt"
no results
can anyone please suggest how to over come this
- 01-12-2008 #2
You can do
Code:find /path\ to\ some\ dir/ -name "*abc.txt"
- 01-13-2008 #3
Have you tried /home/someuser/"this folder name has spaces"/?
Or rename the folder. Spaces are evil.
- 01-13-2008 #4Just Joined!
- Join Date
- Aug 2007
- Posts
- 15
thank you so much daark.child and rcgreen. i tried your code daark.child and its working perfectly...
thank you so much to both of u for finding time to reply
thanks
- 01-13-2008 #5Linux Engineer
- Join Date
- Feb 2005
- Posts
- 1,043


Reply With Quote

