emily
1
Hi all,
I have some directory structure as
$ls -ltr
drwxr-xr-x 1 mscprod us_msc 512 May 10 08:34 650
drwxr-xr-x 1 mscprod us_msc 512 May 10 08:51 652
drwxr-xr-x 1 mscprod us_msc 512 May 10 08:51 640
drwxr-xr-x 1 mscprod us_msc512 May 10 09:13 654
$ cd 650/
$ls
fileabc.root
and within each directory has some file with extension *root.
I want to have all this information in a txt file in the given form
/complete path till 650/file1.root
/complete path till 652/file2.root
and so on for all directories.
Thanks in advance
find /path -iname "*root"
A slight improvement
find /path -name "*.root"
emily
5
Hi,
both command seems to serve the purpose. Then what is the difference?
Thanks
1) *.root means any string ending with "root" after "."
2) "*root" means any string ending with "root"
create 2 files a) abcroot and b) abc.root
and note the difference in both commands
emily
7
Hi,
Thanks aahish,
But that I know. I was asking for the difference in "iname" and "name".
-iname does a case insensitive match. So, rOOt, ROOT, Root...will all be matched
The man find from the terminal will give you all the options.