Create a directory with current date

Thread Solved

Join Date: Dec 2006
Posts: 29
Reputation: egmik3 is an unknown quantity at this point 
Solved Threads: 0
egmik3's Avatar
egmik3 egmik3 is offline Offline
Light Poster

Create a directory with current date

 
0
  #1
Mar 4th, 2009
Does anyone know of a simple command that could get the date and make a folder (mkdir) as its name?

say todays date

20090304

as the folder name.


I guess the first thing would be grep the date? Then run a mkdir command?

Any help is appreciated!

Thanks
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 29
Reputation: egmik3 is an unknown quantity at this point 
Solved Threads: 0
egmik3's Avatar
egmik3 egmik3 is offline Offline
Light Poster

Re: Create a directory with current date

 
0
  #2
Mar 4th, 2009
Also need help on listing the cpu information with echo.

I have these commands I use now:

cat /etc/SuSE-release #Shows version and bit
df -h #Shows Memory +more
top #Shows Ram +more
less /proc/cpuinfo #Shows CPU +more

I am really just looking for these things listed so I know where to start on an upgrade:

CPU
Memory
RAM
OS version
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 399
Reputation: eggi will become famous soon enough eggi will become famous soon enough 
Solved Threads: 47
eggi eggi is offline Offline
Posting Whiz

Re: Create a directory with current date

 
0
  #3
Mar 5th, 2009
Hey there,

This should work:

mkdir `date +%Y%m%d`
Best wishes,

Mike
Linux and Unix Tips, Tricks and Individual Advice - The Linux and Unix Menagerie!
------------------------------------------------------------------------
The greatest viral marketing idea of all time, get your copy of this Free Report now!
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Shell Scripting Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC