Re: Bash Scripting Assistance

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

 



To create the directory with date and time:

mkdir `date +%d%b%Y"_"%k%M%S`

where,

%d - Day
%b - Month
%Y - Year
%k - hour
%M - minute
%S - seconds

The rest of the script, I believe that is easy, right?

----- Original Message -----
From: "EmbraceThePenguin" <jgiles@xxxxxxxxxxx>
To: <redhat-list@xxxxxxxxxx>
Sent: Monday, November 17, 2003 1:41 PM
Subject: Bash Scripting Assistance


> 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
>
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list


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