Re: Bash Scripting Assistance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Maybe the following will work.

file=`date +%y%m%d%`

mkdir $file

cp -r directory $file

Rick

On Mon, 2003-11-17 at 10:41, EmbraceThePenguin wrote:
> Hello All,
> 
> I wish to create a script that will copy the contents of a directory to
> another location. Not a big deal at all, however, prior to copying the
> data, I want to the script to mkdir a directory for the new data and I
> want the directory name to be the date and time stamp of the time the copy
> happened. I wish to use this script in a cron job.
> 
> How would I go about creating a folder using the current time and date?
> 
> Thanks much for the assistance
> 
> Joe
-- 
Rick Henderson
Computer Services Administrator
(936) 291-5356
rick.henderson@xxxxxxxxx


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux