Cron job daily folder report The Next CEO of Stack OverflowHow do I determine the total size...
MAZDA 3 2006 (UK) - poor acceleration then takes off at 3250 revs
Are there languages with no euphemisms?
How to get regions to plot as graphics
Customer Requests (Sometimes) Drive Me Bonkers!
Is it okay to store user locations?
Is a stroke of luck acceptable after a series of unfavorable events?
Fastest way to shutdown Ubuntu Mate 18.10
Why here is plural "We went to the movies last night."
Why didn't Khan get resurrected in the Genesis Explosion?
What is the purpose of the Evocation wizard's Potent Cantrip feature?
Was a professor correct to chastise me for writing "Prof. X" rather than "Professor X"?
How to be diplomatic in refusing to write code that breaches the privacy of our users
What makes a siege story/plot interesting?
India just shot down a satellite from the ground. At what altitude range is the resulting debris field?
Text adventure game code
What does "Its cash flow is deeply negative" mean?
Inappropriate reference requests from Journal reviewers
Term for the "extreme-extension" version of a straw man fallacy?
Anatomically Correct Strange Women In Ponds Distributing Swords
Why do professional authors make "consistency" mistakes? And how to avoid them?
How to count occurrences of text in a file?
Why does standard notation not preserve intervals (visually)
Is the concept of a "numerable" fiber bundle really useful or an empty generalization?
Why were Madagascar and New Zealand discovered so late?
Cron job daily folder report
The Next CEO of Stack OverflowHow do I determine the total size of a directory (folder) from the command line?Daily cron job not runningCron job daily not runningDaily Cron job not executingZombie being made from 'tail -f' cron job that grep's and launches shell scripthow to find a folder based on creation timeCron Job doesn't executeUbuntu 16.04LTS Create Cron Job in cron.daily that will display the contents of auth.log to folder in every users home directory?How to Change Base Folder Datecron job decides for itself if it wants to run
So I have a script that generates a report about a folder date and time the report was created for each time the cron runs, a folder size and number of items in the folder, and the free disk space. So here is what is in my crontab
:
0 12 * * * /home/jacob/report.sh >> /home/jacob/report.txt 2>&1
My report.sh looks like this
#!/bin/bash
du -sh /Magna
df -h /Magna
I don't understand how to get the date and time the report was generated and when I display the size of the folder it doesn't tell me how many files are in it. In the text file I would like my output to look like:
Monday March 28 2009 11:50pm
10M 30
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 100G 92M 99G 1% /Magna
My script correctly outputs the size of the disk and free space. It partially puts out what I want as far as the size of the folder but does not tell me how many files are in the folder. For the date and time I'm completely lost on that one.
14.04 command-line bash scripts cron
add a comment |
So I have a script that generates a report about a folder date and time the report was created for each time the cron runs, a folder size and number of items in the folder, and the free disk space. So here is what is in my crontab
:
0 12 * * * /home/jacob/report.sh >> /home/jacob/report.txt 2>&1
My report.sh looks like this
#!/bin/bash
du -sh /Magna
df -h /Magna
I don't understand how to get the date and time the report was generated and when I display the size of the folder it doesn't tell me how many files are in it. In the text file I would like my output to look like:
Monday March 28 2009 11:50pm
10M 30
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 100G 92M 99G 1% /Magna
My script correctly outputs the size of the disk and free space. It partially puts out what I want as far as the size of the folder but does not tell me how many files are in the folder. For the date and time I'm completely lost on that one.
14.04 command-line bash scripts cron
add a comment |
So I have a script that generates a report about a folder date and time the report was created for each time the cron runs, a folder size and number of items in the folder, and the free disk space. So here is what is in my crontab
:
0 12 * * * /home/jacob/report.sh >> /home/jacob/report.txt 2>&1
My report.sh looks like this
#!/bin/bash
du -sh /Magna
df -h /Magna
I don't understand how to get the date and time the report was generated and when I display the size of the folder it doesn't tell me how many files are in it. In the text file I would like my output to look like:
Monday March 28 2009 11:50pm
10M 30
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 100G 92M 99G 1% /Magna
My script correctly outputs the size of the disk and free space. It partially puts out what I want as far as the size of the folder but does not tell me how many files are in the folder. For the date and time I'm completely lost on that one.
14.04 command-line bash scripts cron
So I have a script that generates a report about a folder date and time the report was created for each time the cron runs, a folder size and number of items in the folder, and the free disk space. So here is what is in my crontab
:
0 12 * * * /home/jacob/report.sh >> /home/jacob/report.txt 2>&1
My report.sh looks like this
#!/bin/bash
du -sh /Magna
df -h /Magna
I don't understand how to get the date and time the report was generated and when I display the size of the folder it doesn't tell me how many files are in it. In the text file I would like my output to look like:
Monday March 28 2009 11:50pm
10M 30
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 100G 92M 99G 1% /Magna
My script correctly outputs the size of the disk and free space. It partially puts out what I want as far as the size of the folder but does not tell me how many files are in the folder. For the date and time I'm completely lost on that one.
14.04 command-line bash scripts cron
14.04 command-line bash scripts cron
asked 13 mins ago
KayenineKayenine
83
83
add a comment |
add a comment |
0
active
oldest
votes
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
});
}
});
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%2f1129575%2fcron-job-daily-folder-report%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f1129575%2fcron-job-daily-folder-report%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