LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-25-2010, 11:28 PM   #1
kma07
LQ Newbie
 
Registered: May 2010
Posts: 6

Rep: Reputation: 0
mkdir with the date


Hi guys

How do I make a directory with the date in this format:

YYYYMM
201005
 
Old 05-26-2010, 12:10 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Code:
mkdir $(date "+format string")
Read "man date" for details.



Cheers,
Tink


P.S.: Why did you mark it solved before there
was an answer/solution?
 
Old 05-26-2010, 11:40 PM   #3
kma07
LQ Newbie
 
Registered: May 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks

I worked it out after I made the thread sorry
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to give options like '-v' for mkdir using system call mkdir() ? nehapawar Linux - Newbie 2 02-05-2010 02:13 AM
Trying to make a directory with mkdir using the date command. Altheastronut Linux - General 5 06-09-2009 12:14 PM
a C++ equivilant to mkdir /tmp/directory.$(date +%Y%m%d).$$" kbartoletta Programming 2 08-27-2008 04:22 PM
Windows XP batch script - mkdir %date% creates spaces! Micro420 Programming 1 10-19-2006 02:55 AM
can I use date command with mkdir? ewto Linux - General 6 06-16-2004 08:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration