Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 09-17-2008, 07:14 AM   #1
Registered: Mar 2007
Distribution: Redhat &CentOS
Posts: 593

Rep: Reputation: 30
call a file dated yesterday


I used to run a script , which output is piped to myscript.log_$(date +\%F).
The log file is created in the form of myscript.log_2008-09-15. Now , say today is 2008-09-16. I want to call the file myscript.log_2008-09-16 using a command. How can I do it?

Old 09-17-2008, 07:18 AM   #2
Senior Member
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
date -d yesterday +\%F
Old 09-17-2008, 07:34 AM   #3
Registered: Mar 2007
Distribution: Redhat &CentOS
Posts: 593

Original Poster
Rep: Reputation: 30

Its Working


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
save info in dated files va1damar Linux - Newbie 1 10-30-2006 11:50 AM
Automated FTP script to grab ONLY newest dated files kaiserbeto Linux - Newbie 4 10-20-2006 02:46 AM
script for display a clock from dated images osio Programming 0 01-14-2006 10:38 AM
Dated 486 Laptop + Linux nemo3383 Linux - Laptop and Netbook 5 03-29-2004 11:33 PM
Why are all IPTables guides out-dated? Can this be done..? Grim Reaper Linux - Networking 1 01-25-2003 07:17 AM

All times are GMT -5. The time now is 07:56 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration