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

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
unsure if this is a unix datestamp??? can you guys tell? uselessprog UNIX for Dummies Questions & Answers 1 04-05-2008 10:18 AM
Find duplicates from multuple files with 2 diff types of files ricky007 Shell Programming and Scripting 2 03-04-2008 01:46 PM
simple help in datestamp ali560045 Shell Programming and Scripting 1 02-27-2008 06:34 AM
Substring/Instring of a string with datestamp bhalotias Shell Programming and Scripting 10 01-24-2008 01:11 PM
text files, ASCII files, binary files and ftp transfers Perderabo Answers to Frequently Asked Questions 0 04-08-2004 04:25 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-18-2005
luft luft is offline
Registered User
  
 

Join Date: Mar 2005
Posts: 45
cp files that have a particular datestamp

Hello all

I'm trying to copy all files in the current directory with yesterday's date to another directory using a single command . I searched the faqs but all the examples listed out involve only the find command.I tried to do something like but it does'nt seem to work.

cp < ls -l |grep "Apr 14" > /usr/users/backup_dir

Thanks
  #2 (permalink)  
Old 04-18-2005
Just Ice's Avatar
Just Ice Just Ice is offline Forum Advisor  
Lights on, brain off.
  
 

Join Date: Mar 2005
Location: in front of my computer
Posts: 637
in the directory the files are located ...

cp -p `ls -l | awk '/Apr 14/ {print $NF}'` /usr/users/backup_dir
  #3 (permalink)  
Old 04-18-2005
luft luft is offline
Registered User
  
 

Join Date: Mar 2005
Posts: 45
cp files that have a particular datestamp

awesome ....Thanks Just Ice ! I need to start looking at AWK commands ....
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 10:24 PM.


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