HPUX: find command finding non-existent files
When I:
Code:
find /home -type f | xargs ls -l | sort -k5 | head Code:
/home/bob/UC.T.DATA not found 2) I added | grep -v "not found" to the command with no effect, why? |
To start with 2, probably the error 'not found' is sent to STDERR, not STDOUT. you should redirect the error to STOUT in order to filter it with grep.
that said, do the files actually exist? and if so, don't they contain 'weird' characters or spaces? |
Could as well be a race condition. I have no idea about the interna of file but I guess that it gets a directory listing and then lists the file of it. But if there beeing enough time between getting the listing of the directory and listing the actual file the file might all ready be deleted. Thus not found.
|
How about this command:
Code:
find /home -type f -exec ls -l {} \; | sort -k5 | head |
The files definitely do not exist.
Redirecting stderr had no affect. find /home -type f -exec ls -l {} \; | sort -k5 | head - just sits there and I had to CTRL-C out of it... I'll just write the output to a text file then parse the file... MY CONCLUSION: HPUX is a POS. Thanks for the help though. |
All times are GMT -5. The time now is 01:23 PM. |