- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ls -R output with full pathname
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2005 01:45 AM
06-03-2005 01:45 AM
I want to find some files with a special string recursively by "ls".
For example: ls -lR /usr |grep "May 31"
Output should be something like:
-rw-rw-rw- root sys 124 May 31 12:26 /usr/test
-rw-r--r-- tom users 278 May 31 2002 /usr/users/tom/.login
-rw-r--r-- peter users 1256 May 31 2004 /usr/users2/peter/mist
Any ideas?
Thank you all, Michael
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2005 01:51 AM
06-03-2005 01:51 AM
Re: ls -R output with full pathname
# find /dir -exec ll {} \; | grep "May 31"
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2005 01:55 AM
06-03-2005 01:55 AM
Re: ls -R output with full pathname
Your best bet, as mentioned above, would be to use find or some other method.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2005 01:55 AM
06-03-2005 01:55 AM
Re: ls -R output with full pathname
Use find instead. redirect it into a file then filter it with grep.
#find . -type f -exec ll {} \; >> /path/outputfile|grep "May 31"
Regards,
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2005 01:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2005 01:58 AM
06-03-2005 01:58 AM
Re: ls -R output with full pathname
Hmm, Robert has a better answer.
you cannot do that in ls, "find" is your best shot.
Regards,
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2005 02:00 AM
06-03-2005 02:00 AM
Re: ls -R output with full pathname
usage:
./findfile.pl -mtime / | grep " 20050531\."
live free or die
harry d brown jr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-03-2005 03:10 AM
06-03-2005 03:10 AM
Re: ls -R output with full pathname
Procura's was perfect; Paul's was very good too, but did only look for files; Robert's found all, but put some lines twice; Harry: I didn't try the perl-script, because "mtime" was not what I was looking for.
Nice weekend,
Michael