Skip to main content

All Questions

Tagged with
1 vote
2 answers
1k views

Create directory with timestamp of newest files

I am trying to create a directory based on the timestamp of the 2 newest files in a directory and then copy those 2 files in to the newly created directory. SO for example -rw-r--r-- 1 root root 0 ...
Rhus's user avatar
  • 13
1 vote
3 answers
1k views

One liner mkdir with directory naming as days?

How can I create directories named as days of the week (i.e Monday, Tuesday, .... Saturday) inside a directory like /tmp/ in one command only? Like combination of mkdir with date +%A or any other. ...
Rahul_Dange's user avatar
1 vote
1 answer
3k views

Make a directory named with date

I want to make a directory with the name being the day. I have this variable: [Desktop]: $dia 21/02/16 created this way: dia=$'date +%d/%m/%y' I'm trying to make a new directory this way: mkdir "$...
Pep's user avatar
  • 11
2 votes
1 answer
870 views

mkdir with date function behaves differently in script

I am trying to create a directory with a timestamp. If I type at the prompt mkdir "$(date +%Y-%m-%d_%H%M%S)" I get a directory named with the date as I would like. If I put the same line in a bash ...
rjss's user avatar
  • 163