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;








1















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.










share|improve this question
























  • 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 ls and * (globs). I.e ls -l * or stat *

    – ctrl-alt-delor
    Jun 8 '15 at 20:25


















1















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.










share|improve this question
























  • 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 ls and * (globs). I.e ls -l * or stat *

    – ctrl-alt-delor
    Jun 8 '15 at 20:25














1












1








1








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.










share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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 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 ls and * (globs). I.e ls -l * or stat *

    – 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












  • @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

















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











1 Answer
1






active

oldest

votes


















1














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






share|improve this answer

























    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
    );



    );













    draft saved

    draft discarded


















    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









    1














    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






    share|improve this answer





























      1














      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






      share|improve this answer



























        1












        1








        1







        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






        share|improve this answer















        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







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Apr 13 '17 at 12:36









        Community

        1




        1










        answered Jun 8 '15 at 20:28









        ztkztk

        15117




        15117



























            draft saved

            draft discarded
















































            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.




            draft saved


            draft discarded














            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





















































            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

            Popular posts from this blog

            Creating 100m^2 grid automatically using QGIS?Creating grid constrained within polygon in QGIS?Createing polygon layer from point data using QGIS?Creating vector grid using QGIS?Creating grid polygons from coordinates using R or PythonCreating grid from spatio temporal point data?Creating fields in attributes table using other layers using QGISCreate .shp vector grid in QGISQGIS Creating 4km point grid within polygonsCreate a vector grid over a raster layerVector Grid Creates just one grid

            What is this called? Old film camera viewer?What makes a good film camera?What to do with an old film camera?What should one look for when buying a used film camera?What is the value and age of this pre-1967 Ricoh 35 mm camera?DSLR recommendation, question about old Canon 35mm film Camera & lensesCan anyone identify the silver rangefinder-style camera in this advertisement?What kind of a Polaroid 600-camera is this?Will an old film camera still work even when not used in a very long time?What is this camera / Can I develop the film?How to fit an action camera into antique (bellows) housing?What to check when buying used and old film bodies?

            Why is this plane circling around the Lucknow airport every day?Why do aircraft on Flight Radar 24 jump around randomly sometimes?What airport has this walkway over a taxiway?How does Chicago O'Hare's tower sequence aircraft at peak capacity?Which airport is featured in this Delta commercial?After a crash, for how long is the airport closed?Can a passenger plane stand still in the air, or hover at a fixed location above a ground?What are those trucks towing around, and why?What is this airport outside of Cairo, Egypt?Which US airport has the lowest circling MDH?What is this airport video?