'date' on a command issued before midnight but ending after midnight. Today or tomorrow date? The 2019 Stack Overflow Developer Survey Results Are InGet today’s date and use it in filenameExcludes specific files from all subdirectories when creating a zip fileCreating 2 zip parts starting from specific bytebatch rename zip files based on contained file namesWhat's the difference between the keyboard shortcut commands and bash ones?How do I zip up multiple files on command line?Date off by years - Cannot set dateCan't coordinate the correct time between system and rtcwakedate command not resolving properly in bash aliasInvalid date error by date command
Keeping a retro style to sci-fi spaceships?
Why didn't the Event Horizon Telescope team mention Sagittarius A*?
What is preventing me from simply constructing a hash that's lower than the current target?
Why doesn't shell automatically fix "useless use of cat"?
Straighten subgroup lattice
How did passengers keep warm on sail ships?
Can there be female White Walkers?
Is it possible for absolutely everyone to attain enlightenment?
Why “相同意思的词” is called “同义词” instead of "同意词"?
Is it ok to offer lower paid work as a trial period before negotiating for a full-time job?
Accepted by European university, rejected by all American ones I applied to? Possible reasons?
Deal with toxic manager when you can't quit
Button changing its text & action. Good or terrible?
Can we generate random numbers using irrational numbers like π and e?
How to type a long/em dash `—`
How to display lines in a file like ls displays files in a directory?
What information about me do stores get via my credit card?
Geography at the pixel level
writing variables above the numbers in tikz picture
Match Roman Numerals
Does HR tell a hiring manager about salary negotiations?
How to translate "being like"?
Pokemon Turn Based battle (Python)
Is an up-to-date browser secure on an out-of-date OS?
'date' on a command issued before midnight but ending after midnight. Today or tomorrow date?
The 2019 Stack Overflow Developer Survey Results Are InGet today’s date and use it in filenameExcludes specific files from all subdirectories when creating a zip fileCreating 2 zip parts starting from specific bytebatch rename zip files based on contained file namesWhat's the difference between the keyboard shortcut commands and bash ones?How do I zip up multiple files on command line?Date off by years - Cannot set dateCan't coordinate the correct time between system and rtcwakedate command not resolving properly in bash aliasInvalid date error by date command
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I will be launching today a zip command naming the new file with the current date (date+%Y-%m-%d
.zip).
The compression will probably end after midnight.
Do you think the zip will be named with today's date or tomorrow's?
Command is:
zip -9 -m -o /path/file_name`date +%Y%m%d`.zip /path/tmp/*
date zip
New contributor
add a comment |
I will be launching today a zip command naming the new file with the current date (date+%Y-%m-%d
.zip).
The compression will probably end after midnight.
Do you think the zip will be named with today's date or tomorrow's?
Command is:
zip -9 -m -o /path/file_name`date +%Y%m%d`.zip /path/tmp/*
date zip
New contributor
2
Show your command, it depends when filename will be generated
– LeonidMew
2 days ago
zip -9 -m -o /path/file_namedate +%Y%m%d
.zip /path/tmp/*
– Daniele Foti
2 days ago
1
@user68186 done! thanks for advice
– Daniele Foti
2 days ago
@LeonidMew Thanks for editing the question and inserting the command from the comment. Daniel Foti, that's what I was talking about.
– user68186
2 days ago
add a comment |
I will be launching today a zip command naming the new file with the current date (date+%Y-%m-%d
.zip).
The compression will probably end after midnight.
Do you think the zip will be named with today's date or tomorrow's?
Command is:
zip -9 -m -o /path/file_name`date +%Y%m%d`.zip /path/tmp/*
date zip
New contributor
I will be launching today a zip command naming the new file with the current date (date+%Y-%m-%d
.zip).
The compression will probably end after midnight.
Do you think the zip will be named with today's date or tomorrow's?
Command is:
zip -9 -m -o /path/file_name`date +%Y%m%d`.zip /path/tmp/*
date zip
date zip
New contributor
New contributor
edited 2 days ago
LeonidMew
1,036622
1,036622
New contributor
asked 2 days ago
Daniele FotiDaniele Foti
12
12
New contributor
New contributor
2
Show your command, it depends when filename will be generated
– LeonidMew
2 days ago
zip -9 -m -o /path/file_namedate +%Y%m%d
.zip /path/tmp/*
– Daniele Foti
2 days ago
1
@user68186 done! thanks for advice
– Daniele Foti
2 days ago
@LeonidMew Thanks for editing the question and inserting the command from the comment. Daniel Foti, that's what I was talking about.
– user68186
2 days ago
add a comment |
2
Show your command, it depends when filename will be generated
– LeonidMew
2 days ago
zip -9 -m -o /path/file_namedate +%Y%m%d
.zip /path/tmp/*
– Daniele Foti
2 days ago
1
@user68186 done! thanks for advice
– Daniele Foti
2 days ago
@LeonidMew Thanks for editing the question and inserting the command from the comment. Daniel Foti, that's what I was talking about.
– user68186
2 days ago
2
2
Show your command, it depends when filename will be generated
– LeonidMew
2 days ago
Show your command, it depends when filename will be generated
– LeonidMew
2 days ago
zip -9 -m -o /path/file_name
date +%Y%m%d
.zip /path/tmp/*– Daniele Foti
2 days ago
zip -9 -m -o /path/file_name
date +%Y%m%d
.zip /path/tmp/*– Daniele Foti
2 days ago
1
1
@user68186 done! thanks for advice
– Daniele Foti
2 days ago
@user68186 done! thanks for advice
– Daniele Foti
2 days ago
@LeonidMew Thanks for editing the question and inserting the command from the comment. Daniel Foti, that's what I was talking about.
– user68186
2 days ago
@LeonidMew Thanks for editing the question and inserting the command from the comment. Daniel Foti, that's what I was talking about.
– user68186
2 days ago
add a comment |
1 Answer
1
active
oldest
votes
It will have todays date. The date command is run when the command is issued.
Actually, the nested command $(date ...)
will be executed by the shell before the zip
command is called. This is called command substitution, the nested command will be replaced by its output.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Daniele Foti is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1132449%2fdate-on-a-command-issued-before-midnight-but-ending-after-midnight-today-or-t%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
It will have todays date. The date command is run when the command is issued.
Actually, the nested command $(date ...)
will be executed by the shell before the zip
command is called. This is called command substitution, the nested command will be replaced by its output.
add a comment |
It will have todays date. The date command is run when the command is issued.
Actually, the nested command $(date ...)
will be executed by the shell before the zip
command is called. This is called command substitution, the nested command will be replaced by its output.
add a comment |
It will have todays date. The date command is run when the command is issued.
Actually, the nested command $(date ...)
will be executed by the shell before the zip
command is called. This is called command substitution, the nested command will be replaced by its output.
It will have todays date. The date command is run when the command is issued.
Actually, the nested command $(date ...)
will be executed by the shell before the zip
command is called. This is called command substitution, the nested command will be replaced by its output.
edited 2 days ago
answered 2 days ago
RoVoRoVo
8,2091943
8,2091943
add a comment |
add a comment |
Daniele Foti is a new contributor. Be nice, and check out our Code of Conduct.
Daniele Foti is a new contributor. Be nice, and check out our Code of Conduct.
Daniele Foti is a new contributor. Be nice, and check out our Code of Conduct.
Daniele Foti is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1132449%2fdate-on-a-command-issued-before-midnight-but-ending-after-midnight-today-or-t%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
Show your command, it depends when filename will be generated
– LeonidMew
2 days ago
zip -9 -m -o /path/file_name
date +%Y%m%d
.zip /path/tmp/*– Daniele Foti
2 days ago
1
@user68186 done! thanks for advice
– Daniele Foti
2 days ago
@LeonidMew Thanks for editing the question and inserting the command from the comment. Daniel Foti, that's what I was talking about.
– user68186
2 days ago