Orkut Gmail Calendar Documents Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
mkdir with dynamique names
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
John Smith  
View profile  
 More options Oct 22 2005, 2:08 pm
Newsgroups: alt.os.linux.debian
From: John Smith <po...@free.Fr>
Date: Sat, 22 Oct 2005 10:38:55 +0200
Local: Sat, Oct 22 2005 2:08 pm
Subject: mkdir with dynamique names
Hi all,

How could you dynamicaly create a folder named:

backup-dd--mm--yy

with dd: current day, mm:current month; yy:current year.

thanks for answer,


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
gregor herrmann  
View profile  
 More options Oct 22 2005, 2:19 pm
Newsgroups: alt.os.linux.debian
From: gregor herrmann <gregor+usenet-0...@comodo.priv.at>
Date: Sat, 22 Oct 2005 10:49:17 +0200
Local: Sat, Oct 22 2005 2:19 pm
Subject: Re: mkdir with dynamique names

On Sat, 22 Oct 2005 10:38:55 +0200, John Smith wrote:
> How could you dynamicaly create a folder named:
> backup-dd--mm--yy

$ date +"%d--%m--%y"
gives you current date in your desired format, and the complete
command would be:
$ mkdir backup-`date +"%d--%m--%y"`
or
$ mkdir backup-$(date +"%d--%m--%y")
(depending on the shell)

BTW: I'd suggest to use the ISO date format. i.e. "date --iso-8601" ->
$ mkdir backup-`date --iso-8601`

gregor
--
 .''`.   http://info.comodo.priv.at/ | gpg key ID: 0x00F3CFE4
 : :' :  infos zur usenet-hierarchie at.*: http://www.usenet.at/
 `. `'   member of https://www.vibe.at/ | how to reply: http://got.to/quote/
   `-    NP: Sinéad O'Connor - Never Get Old


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "mkdir with dynamique names, many thanks" by John Smith
John Smith  
View profile  
 More options Oct 22 2005, 2:39 pm
Newsgroups: alt.os.linux.debian
From: John Smith <po...@free.Fr>
Date: Sat, 22 Oct 2005 11:09:13 +0200
Local: Sat, Oct 22 2005 2:39 pm
Subject: Re: mkdir with dynamique names, many thanks
Many thanks, Gregor, for your answer.
It works fine with

mkdir backup-`date --iso-8601`

best regards,
cu.


    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2010 Google