Find the answer to your Linux question:
Results 1 to 2 of 2
hello, im relatively new here and i aint too sure about a few things. anyway. im trying to create a directory within a script which is named with the current ...
  1. #1
    Just Joined!
    Join Date
    Dec 2009
    Posts
    1

    directory with date name

    hello,

    im relatively new here and i aint too sure about a few things.

    anyway. im trying to create a directory within a script which is named with the current date and time. this directory name will need to be in the format of day-month-year-time as my script may be run more than once in the same day and i do not want it overwriting the previously created directory.

    i think i know how to do this using mkdir

    however once i have created this directory i need to use it again, in a different script which runs after the one which this command is based in, to create three new directories which would be placed inside the date directory created.

    do you have any suggestions as to how this would be achieved or is it impossible?

  2. #2
    Linux Engineer khafa's Avatar
    Join Date
    Apr 2008
    Location
    Tokyo, Japan
    Posts
    858
    Hi,

    Maybe the first script can save the directory name (used with mkdir) in a file and then the second script will have to parse that file and get the directory name.
    Linux and me it's a love story

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...