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
How to list file names in a certain date range using ls command? satish.vutti UNIX for Dummies Questions & Answers 4 05-27-2009 01:06 PM
BASH complete-filename & menu-complete together Mithu UNIX for Dummies Questions & Answers 0 01-06-2009 03:00 PM
Finding modified File List after the chosen date in Korne Shell... marconi Shell Programming and Scripting 2 01-22-2008 05:27 AM
Ensure FTP is complete before using file GMMike UNIX for Dummies Questions & Answers 10 07-11-2007 06:14 AM
want to list with a date maverick Shell Programming and Scripting 2 10-31-2003 02:32 AM

Reply
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 07-16-2009
Satyak Satyak is offline
Registered User
  
 

Join Date: Feb 2008
Posts: 85
How Get Complete Date in List of file

Hi,

I am unable to get the complete date format in ls command.
I need to list file with complete date format in home directory.

If I give 2007/01/01 then i should get all the log files below that particular date.

Pls help me
  #2 (permalink)  
Old 07-16-2009
BubbaJoe's Avatar
BubbaJoe BubbaJoe is offline
Registered User
  
 

Join Date: Oct 2008
Location: St Louis
Posts: 153
Are you saying you are doing a ls command with a date as part of the input to the command. Something to the effect:

ls *2007/01/01*

or are the files under a dated directory like /home/2007/01/01?

Whenever using a "/" in a file list you would have to escape it so that it does interpret the "/" as a directory. So you could do something like

ls *2007\/01\/01*

Giving us example if the file names you would see in the directory and where would help.
  #3 (permalink)  
Old 07-16-2009
akrathi akrathi is offline
Registered User
  
 

Join Date: Sep 2005
Posts: 41
This works in ksh

ls 23\\02\\2009
Reply

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:54 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