The UNIX and Linux Forums  

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
BEA Enters the CEP Market with Weblogic Event Server iBot Complex Event Processing RSS News 0 08-10-2007 12:50 AM
pick the bug the server enters an infinite loop arjunjag High Level Programming 3 07-19-2007 02:53 AM
Need a script to Append date to generated .txt file prince_of_focus Shell Programming and Scripting 2 08-01-2006 03:51 PM
Shell script: last modification date for a file onlyc UNIX for Dummies Questions & Answers 4 07-06-2006 02:01 PM
file date check script jaxconsultant UNIX for Dummies Questions & Answers 4 10-10-2001 04:23 PM

Closed Thread
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 06-04-2005
raidersboi raidersboi is offline
Registered User
  
 

Join Date: Jun 2005
Posts: 6
script that enters date in file

hello there,

currently fiddling around with unix commands to get a better understanding of coding in general (if that made sense) .. i was wondering if there was a command that inserted the date into a exisiting file, then having that edited file being called something else. (ie. file and file.dated)

thx for the help
  #2 (permalink)  
Old 06-04-2005
vgersh99's Avatar
vgersh99 vgersh99 is offline Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,131
date >> file.dated
  #3 (permalink)  
Old 06-04-2005
raidersboi raidersboi is offline
Registered User
  
 

Join Date: Jun 2005
Posts: 6
thx for your quick response
  #4 (permalink)  
Old 06-11-2005
reborg's Avatar
reborg reborg is offline Forum Staff  
Administrator
  
 

Join Date: Mar 2005
Location: Ireland
Posts: 4,246
and to copy a file to a date stamped file with date in the format YYYYMMDD
you could use

cp file file.`date +%Y%m%d`

you should read the man page for date to find a format that suits what you want.
Closed Thread

Bookmarks

Tags
unix commands

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 03:16 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