1825694 Members
3349 Online
109686 Solutions
New Discussion

Find

 
Vinayak_6
New Member

Find

Hi ,
I am having a file csvinv.dat under /app/dev49i/csv/inqload/csvinv.dat directory.
But while using find command I get following output.Can anyone help on this.

$ pwd
/app/dev49i
$ find /app/dev49i/ -name csvinv.dat -print
Give no putput
$ find /app/dev49i/. -name csvinv.dat -print
One dot after dev49i shows o/p as below...

/app/dev49i/./csv/inqload/csvinv.dat

$ ls -al /app/dev49i/csv/inqload/csvinv.dat
-rwxr-xr-x 1 iefit dba 99665 Aug 14 15:56 /app/dev49i/csv/inqloa
d/csvinv.dat


Regards
Bapatvin
5 REPLIES 5
Geoff Wild
Honored Contributor

Re: Find

Remove the trailing /

find /app/dev49i -name csvinv.dat -print


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Vinayak_6
New Member

Re: Find

Hi

No it's not working in that way.I dont think it's anything wrong with cmd..Something strange.Does fsck/unmounting the file system will help...

Experts pls advice.
Geoff Wild
Honored Contributor

Re: Find

Well...that is strange, I just re-sreated it on my workstation:

mkdir -p /app/dev49i/csv/inqload

touch /app/dev49i/csv/inqload/csvinv.dat

cd /app/dev49i

find /app/dev49i -name csvinv.dat -print
/app/dev49i/csv/inqload/csvinv.dat


ls -al /app/dev49i/csv/inqload/csvinv.dat
-rw-r--r-- 1 root sys 0 Sep 8 10:45 /app/dev49i/csv/inqload/csvinv.dat

Which shell are you using?

env |grep SHELL

Rgds...Geoff

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Muthukumar_5
Honored Contributor

Re: Find


Generally . (dot) used to notify the current directory there.

We can identify the /home/muthu as,

/home/./muthu too. It is like the file name with current directory ./filename as like to refer the file which is located on root as /filename.

$dir --> $dir/ --> $dir/./ are same on command execution

We can use / or /./ to notify the root directory.

If you do ls as,

ls -al /app/dev49i/csv/./inqload/csvinv.dat

It will be indicating same file there. It is just notation used to include current directory there.
Easy to suggest when don't know about the problem!
Vinayak_6
New Member

Re: Find

Hi ,

OK O got it .
It's symbolic link.I thought it before also.
It's working with this command ,

find /app/dev49i -follow -name csvinv.dat -print

Thks

Bapatvin