The UNIX and Linux Forums  
Hello and Welcome from to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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
To get the latest file spkandy Shell Programming and Scripting 2 04-08-2009 01:37 AM
get latest file inquirer Shell Programming and Scripting 4 04-02-2009 12:15 PM
How do I get the name of latest file? Hangman2 Shell Programming and Scripting 5 01-03-2009 10:18 AM
Getting latest file from ftp arunavlp UNIX for Dummies Questions & Answers 3 02-08-2008 10:19 AM
Help with multiple file rename - change case of part of file name steve7 UNIX for Dummies Questions & Answers 7 06-30-2005 02:41 PM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 07-07-2009
wtolentino wtolentino is offline
Registered User
  
 

Join Date: Oct 2005
Posts: 33
Rename The Latest File

i need to get the latest file based on timestamp. assuming that i have the following files:

Code:
$ ls -latr
total 40
drwxr-sr-x    6 pcrdftdv pcrdgrp         512 Jun 30 12:53 ..
-rwxrwxrwx    1 pcrdftdv pcrdgrp           6 Jul 07 13:35 sample1.csv
-rwxr-xr-x    1 pcrdftdv pcrdgrp           6 Jul 07 14:14 sample2.scv
-rwxr-xr-x    1 pcrdftdv pcrdgrp           6 Jul 07 14:15 sample3.csv
drwxr-sr-x    2 pcrdftdv pcrdgrp         512 Jul 07 14:15 .
$
in the example above the file sample3.csv is the last or latest that was created. how can i get the latest file and rename it to PCARDEXPT file? thanks.
 

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 02:31 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