How to create a bash script that sees all files in a directory and tells me their size and date of creation? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election Results Why I closed the “Why is Kali so hard” questionHow to find creation date of file?Read all files in folder and subfolders - progress and sizescript that lists all files in a directory and subdirectories sorted by size, listing only file names not complete pathsBash script that detects if a file is the correct sizeBash script to list items in directory by sizeFind files older than X days and output them by their sizeFind All images file size and width in directoryList files in all subdirectories by creation dateHow do I create a list of the file contents of a directory and sub-directories with creation, added, modified and last opened times for each file?Find files, print creation date and file namebash script that will go through all files in a directory listed as as the first argument
Losing the Initialization Vector in Cipher Block Chaining
Mortgage adviser recommends a longer term than necessary combined with overpayments
Replacing HDD with SSD; what about non-APFS/APFS?
Geometric mean and geometric standard deviation
Interesting examples of non-locally compact topological groups
How do I keep my slimes from escaping their pens?
Complexity of many constant time steps with occasional logarithmic steps
What do you call the holes in a flute?
What did Darwin mean by 'squib' here?
The following signatures were invalid: EXPKEYSIG 1397BC53640DB551
How are presidential pardons supposed to be used?
Keep going mode for require-package
Passing functions in C++
How to retrograde a note sequence in Finale?
Are my PIs rude or am I just being too sensitive?
Can the prologue be the backstory of your main character?
How did the aliens keep their waters separated?
Why is "Captain Marvel" translated as male in Portugal?
Is it possible to ask for a hotel room without minibar/extra services?
Unable to start mainnet node docker container
Stop battery usage [Ubuntu 18]
How can I make names more distinctive without making them longer?
How can players take actions together that are impossible otherwise?
Cold is to Refrigerator as warm is to?
How to create a bash script that sees all files in a directory and tells me their size and date of creation?
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
2019 Community Moderator Election Results
Why I closed the “Why is Kali so hard” questionHow to find creation date of file?Read all files in folder and subfolders - progress and sizescript that lists all files in a directory and subdirectories sorted by size, listing only file names not complete pathsBash script that detects if a file is the correct sizeBash script to list items in directory by sizeFind files older than X days and output them by their sizeFind All images file size and width in directoryList files in all subdirectories by creation dateHow do I create a list of the file contents of a directory and sub-directories with creation, added, modified and last opened times for each file?Find files, print creation date and file namebash script that will go through all files in a directory listed as as the first argument
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm trying to write a bash script that will see all files in a directory, and then tell me each file's size and each of their dates of creation.
bash files scripting ls
add a comment |
I'm trying to write a bash script that will see all files in a directory, and then tell me each file's size and each of their dates of creation.
bash files scripting ls
From a shell prompt, start withman stat. Note that most filesystems do not store a file's create date.
– glenn jackman
Jun 8 '15 at 20:16
@glennjackman they do store last written date.
– ctrl-alt-delor
Jun 8 '15 at 20:24
Have a look atlsand*(globs). I.els -l *orstat *
– ctrl-alt-delor
Jun 8 '15 at 20:25
add a comment |
I'm trying to write a bash script that will see all files in a directory, and then tell me each file's size and each of their dates of creation.
bash files scripting ls
I'm trying to write a bash script that will see all files in a directory, and then tell me each file's size and each of their dates of creation.
bash files scripting ls
bash files scripting ls
edited 16 hours ago
Rui F Ribeiro
42.1k1483142
42.1k1483142
asked Jun 8 '15 at 20:14
Aiden ProhaskaAiden Prohaska
1315
1315
From a shell prompt, start withman stat. Note that most filesystems do not store a file's create date.
– glenn jackman
Jun 8 '15 at 20:16
@glennjackman they do store last written date.
– ctrl-alt-delor
Jun 8 '15 at 20:24
Have a look atlsand*(globs). I.els -l *orstat *
– ctrl-alt-delor
Jun 8 '15 at 20:25
add a comment |
From a shell prompt, start withman stat. Note that most filesystems do not store a file's create date.
– glenn jackman
Jun 8 '15 at 20:16
@glennjackman they do store last written date.
– ctrl-alt-delor
Jun 8 '15 at 20:24
Have a look atlsand*(globs). I.els -l *orstat *
– ctrl-alt-delor
Jun 8 '15 at 20:25
From a shell prompt, start with
man stat. Note that most filesystems do not store a file's create date.– glenn jackman
Jun 8 '15 at 20:16
From a shell prompt, start with
man stat. Note that most filesystems do not store a file's create date.– glenn jackman
Jun 8 '15 at 20:16
@glennjackman they do store last written date.
– ctrl-alt-delor
Jun 8 '15 at 20:24
@glennjackman they do store last written date.
– ctrl-alt-delor
Jun 8 '15 at 20:24
Have a look at
ls and * (globs). I.e ls -l * or stat *– ctrl-alt-delor
Jun 8 '15 at 20:25
Have a look at
ls and * (globs). I.e ls -l * or stat *– ctrl-alt-delor
Jun 8 '15 at 20:25
add a comment |
1 Answer
1
active
oldest
votes
Getting the creation date will be a tough one on a Linux system as it isn't stored.
Related question:
How to find creation date of file?
Use the ls command to list files, try the options -a and -s to list all, and list their sizes. Use the command man ls on the command line to read a full description on the ls command
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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%2funix.stackexchange.com%2fquestions%2f208327%2fhow-to-create-a-bash-script-that-sees-all-files-in-a-directory-and-tells-me-thei%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
Getting the creation date will be a tough one on a Linux system as it isn't stored.
Related question:
How to find creation date of file?
Use the ls command to list files, try the options -a and -s to list all, and list their sizes. Use the command man ls on the command line to read a full description on the ls command
add a comment |
Getting the creation date will be a tough one on a Linux system as it isn't stored.
Related question:
How to find creation date of file?
Use the ls command to list files, try the options -a and -s to list all, and list their sizes. Use the command man ls on the command line to read a full description on the ls command
add a comment |
Getting the creation date will be a tough one on a Linux system as it isn't stored.
Related question:
How to find creation date of file?
Use the ls command to list files, try the options -a and -s to list all, and list their sizes. Use the command man ls on the command line to read a full description on the ls command
Getting the creation date will be a tough one on a Linux system as it isn't stored.
Related question:
How to find creation date of file?
Use the ls command to list files, try the options -a and -s to list all, and list their sizes. Use the command man ls on the command line to read a full description on the ls command
edited Apr 13 '17 at 12:36
Community♦
1
1
answered Jun 8 '15 at 20:28
ztkztk
15117
15117
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- 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%2funix.stackexchange.com%2fquestions%2f208327%2fhow-to-create-a-bash-script-that-sees-all-files-in-a-directory-and-tells-me-thei%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
-bash, files, ls, scripting
From a shell prompt, start with
man stat. Note that most filesystems do not store a file's create date.– glenn jackman
Jun 8 '15 at 20:16
@glennjackman they do store last written date.
– ctrl-alt-delor
Jun 8 '15 at 20:24
Have a look at
lsand*(globs). I.els -l *orstat *– ctrl-alt-delor
Jun 8 '15 at 20:25