1836987 Members
1989 Online
110111 Solutions
New Discussion

ll -R with path

 
Konrad Hegner
Frequent Advisor

ll -R with path

Hello

I'm looking for a command which show me not only the filename but also the path.

The story behind:
We have a crash from a special application and I'm looking for all files which was changed in the time (same minute) from the crash:
ll -R / | grep -i 12:34 > timestamp.txt

This output brings 'only' a list from the file, but not the path, so I have to search every file again and with over 190 files it is a lot of work ;-(

Have anyone a trick?
3 REPLIES 3
Peter Nikitka
Honored Contributor

Re: ll -R with path

Hi Konrad,

the find command will do that:

find / -type f -mtime -1 | xargs ls -ld

Change the '-mtime -N' option to select the correct time frame.

Solaris-find has an option '-ls' to print the output directly, but I dont't think HPUX has it.

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
Stephen Keane
Honored Contributor

Re: ll -R with path

Create a script (called say foo.ksh)

#!/bin/ksh

if [ `ll $1 | grep -c $2` -ne 0 ]
then
echo $1
fi


Then run find ...

# find . -exec foo.ksh {} "12:34" \;

The syntax of the find command is important, don't miss out anything!







Henk Geurts
Esteemed Contributor

Re: ll -R with path

another option:
find / -type f -mtime -1 -exec ll {} \; |grep "12:34"

regards.