The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Shell Script problem in sun 5. 9 babu.knb SUN Solaris 4 10-01-2008 08:45 AM
problem in shell script girish.batra Shell Programming and Scripting 5 02-18-2008 02:27 AM
Problem with SU or SSH in shell script sravanp UNIX for Dummies Questions & Answers 2 01-24-2006 12:00 PM
shell script problem jayaram_miryabb Shell Programming and Scripting 1 03-09-2005 06:38 AM
Problem with shell script nattynatty Shell Programming and Scripting 4 04-09-2002 04:30 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-04-2008
Muki101 Muki101 is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 9
Problem with shell script

Here is the code:


Code:
find `pwd`/$1/ -name "*.*" -exec ls -l {} \;

It finds all the files of a given directory with last modified time. Any ideas how I could sort them by modified times (older ones first)

Thanks in advance!
  #2 (permalink)  
Old 11-04-2008
joeyg's Avatar
joeyg joeyg is offline Forum Staff  
modérateur
  
 

Join Date: Dec 2007
Location: Home of 17-time world champion Boston Celtics
Posts: 1,311
Cool

instead of ls -l try ls -ltr
  #3 (permalink)  
Old 11-04-2008
Muki101 Muki101 is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 9
Already tried that before and it doesn't work. As I understand it still uses find as the main command and when recursively going through the lines the ls just adds the rest of the information in addition to the file path.

So thanks anyway but any more suggestions?

Last edited by Muki101; 11-04-2008 at 05:37 PM..
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate 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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 10:28 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0