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
pERL SCRIPT FOR MONITORING DATE/TIME STAMPS FOR START AND STOP OF APPLICAION IN A LOG FREDDIE091970 Shell Programming and Scripting 4 03-31-2008 10:59 PM
Processing a log file based on date/time input and the date/time on the log file primp Shell Programming and Scripting 4 03-16-2008 11:23 AM
Execute a part of shell script only after particular date and time fed.linuxgossip Shell Programming and Scripting 2 06-16-2007 10:04 PM
How do i collect date and time for list of files in a directory laknar Shell Programming and Scripting 4 06-01-2007 01:31 PM
Script to display last login date/time? ryaneverett5 UNIX for Dummies Questions & Answers 3 12-06-2001 05:21 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 06-08-2007
laknar laknar is offline
Registered User
  
 

Join Date: Apr 2007
Posts: 55
How do i collect Date & Time from Different Directories in a script

How do i collect Date & Time from Different Directories in a script

The script iam using for a single directory is :

ls -l | grep awk '{print $8}'
  #2 (permalink)  
Old 06-08-2007
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,789

Code:
ls -l /path/to/dir1  path/to/dir2 | awk '{print $8}'

  #3 (permalink)  
Old 06-08-2007
lorcan lorcan is offline
Registered User
  
 

Join Date: May 2007
Posts: 219
Quote:
Originally Posted by jim mcnamara
Code:
ls -l /path/to/dir1  path/to/dir2 | awk '{print $8}'
A small Correction


Code:
ls -ld /path/to/dir1  path/to/dir2 | awk '{print $8}'

So this will list the timestamp of the directories alone, assuming eighth field contains the timestamp
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 05:33 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