Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-12-2007, 03:19 PM
|
#1
|
|
LQ Newbie
Registered: Jun 2007
Distribution: Gentoo/FreeBSD
Posts: 7
Rep:
|
Simple Scripting Help
I need to get a directory listing of all the perl scripts in /www and display them in the form of "Absolute Path" and "Last Time Accessed". There are a few commands I have been working with but none of them do what I need.
ls -dRlu $PWD/* - only lists the current directory, does not search recursively
awk '{ print $0 }' /www/findoutput-all.txt - findoutput-all.txt is a file with a listing of all the scripts, but I cannot get the output into 'ls'
Can you steer me in the right direction?
|
|
|
|
06-12-2007, 04:09 PM
|
#2
|
|
Guru
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 5,644
|
ls `cat /www/findoutput-all.txt`
Note the above are back ticks rather than single quotes. Putting a command line in back ticks tells it to first execute that THEN use its output as the input for the original command (ls).
Above assumes you don't have spaces in your file names.
|
|
|
|
06-12-2007, 04:46 PM
|
#3
|
|
LQ Newbie
Registered: Jun 2007
Distribution: Gentoo/FreeBSD
Posts: 7
Original Poster
Rep:
|
That worked perfectly! Thank you, I completely forgot about the back ticks.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 04:28 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|