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 here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to search for files based on the time stamp sunny_03 UNIX for Dummies Questions & Answers 1 02-12-2008 05:45 AM
script needed for listing files jayaramanit Shell Programming and Scripting 2 09-10-2007 04:17 AM
Copy all the files with time stamp and remove header,trailer from file ksrams UNIX for Dummies Questions & Answers 35 07-30-2007 11:15 AM
Need to delete the files based on the time stamp of the file samudha UNIX for Dummies Questions & Answers 2 06-20-2007 04:02 AM
How to list today's files berlin_germany Shell Programming and Scripting 4 11-29-2006 03:50 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-03-2004
Registered User
 

Join Date: Mar 2004
Posts: 3
Stumble this Post!
script for listing files of today's time stamp

Hi,

I need to write a script,which behaves like this,

Given the folder name, it should list the files with today's timestamp.

Please direct me on this.

Thanks.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 04-04-2004
Registered User
 

Join Date: Apr 2004
Location: beijing
Posts: 15
Stumble this Post!
Re: script for listing files of today's time stamp

Quote:
Originally posted by kid123
Hi,

I need to write a script,which behaves like this,

Given the folder name, it should list the files with today's timestamp.

Please direct me on this.

Thanks.
first:
$_date=$(date +%Y-%m-%d)
second:
$ls --full-time|awk '/'$_date'/{print $NF}'
by the way:i can't express it,sorry
__________________
my Homepage:
http://www.linuxsir.org
Reply With Quote
  #3 (permalink)  
Old 04-06-2004
mbb mbb is offline
Registered User
 

Join Date: Aug 2001
Location: UK
Posts: 103
Stumble this Post!
or use the find command.

e.g. find /home/usr -atime 1

do

man find

for more info on the find command.
__________________
Senior Analyst/Programmer
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:50 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0