I want to print out all the File Names, their Creation Dates, and their Modification Dates. (Printing all the other info is fine too.) If
possible, I would like to do it in a form that can be easily put into a
I want to print out all the File Names, their Creation Dates, and their Modification Dates. (Printing all the other info is fine too.) If possible, I would like to do it in a form that can be easily put into a spreadsheet.
In the built-in FreeBSD, the results of "ls" can be printed as text;
then the text can be put into a spreadsheet without too much trouble,
by figuring out the appropriate separator(s). Unfortunately, "ls" does
not display Creation Date, only Latest Access Date or Latest
Modification Date. (Likewise for other Unix-like systems, apparently.)
And the Creation Date is the one I need most.
In the OS, you can take a screenshot and save it as a PDF. But I don't think it's a PDF from which text can be extracted. I'm not sure,
though ... because I can't find where the PDF is being saved ... or if
it's being saved at all! (Probably because of the very reason why I
want this info, namely, to help decide which files to delete, since my
HD is so clogged that the computer is slowed down to almost zero.)
The online recommendation I found for printing from the OS says to copy
it by hand(!) into the spreadsheet or text file.
Anyone know how to get at least a text file of the name and the
Creation Date? As automatically as possible?
(P.S. OS X 10.13 because I'm dubious about putting anything later on
my late-2013 MacBook Pro, and I can't afford a new computer right now.)
On Apr 29, 2024 at 6:51:05 PM PDT, "Dudley Brooks"
<dbrooks@runforyourlife.org> wrote:
I want to print out all the File Names, their Creation Dates, and their
Modification Dates. (Printing all the other info is fine too.) If
possible, I would like to do it in a form that can be easily put into a
You can use the stat utility in a command-line shell in the Terminal application to print out creation and modification times for any file.
Use 'man stat' for details. Use the -f option to specifiy the content and format for the fields to be displayed.
You want the following format specifiers:
%SN to display the file name
%SB to display the creation (birth) time
%Sm to display the modification time
%t to insert tab characters between fields
So the following should give you what you want:
stat -f '%SN%t%SB%t%Sm' *
Redirect the output to a file:
stat -f '%SN%t%SB%t%Sm' * > file_times.txt
and you can import that into a spreadsheet specifying tab characters to separate columns,
On 2024-04-30, Jim Gibson <jimsgibson@gmail.com> wrote:
On Apr 29, 2024 at 6:51:05 PM PDT, "Dudley Brooks"
<dbrooks@runforyourlife.org> wrote:
I want to print out all the File Names, their Creation Dates, and their
Modification Dates. (Printing all the other info is fine too.) If
possible, I would like to do it in a form that can be easily put into a
You can use the stat utility in a command-line shell in the Terminal
application to print out creation and modification times for any file.
Use 'man stat' for details. Use the -f option to specifiy the content and
format for the fields to be displayed.
You want the following format specifiers:
%SN to display the file name
%SB to display the creation (birth) time
%Sm to display the modification time
%t to insert tab characters between fields
So the following should give you what you want:
stat -f '%SN%t%SB%t%Sm' *
Redirect the output to a file:
stat -f '%SN%t%SB%t%Sm' * > file_times.txt
and you can import that into a spreadsheet specifying tab characters to
separate columns,
I would use comma characters for delimiters to make it a CSV file, then
open that in a spreadsheet program.
On 2024-04-30 01:51:05 +0000, Dudley Brooks said:
I want to print out all the File Names, their Creation Dates, and
their Modification Dates. (Printing all the other info is fine too.)
If possible, I would like to do it in a form that can be easily put
into a spreadsheet.
In the built-in FreeBSD, the results of "ls" can be printed as text;
then the text can be put into a spreadsheet without too much trouble,
by figuring out the appropriate separator(s). Unfortunately, "ls"
does not display Creation Date, only Latest Access Date or Latest
Modification Date. (Likewise for other Unix-like systems,
apparently.) And the Creation Date is the one I need most.
In the OS, you can take a screenshot and save it as a PDF. But I
don't think it's a PDF from which text can be extracted. I'm not
sure, though ... because I can't find where the PDF is being saved ...
or if it's being saved at all! (Probably because of the very reason
why I want this info, namely, to help decide which files to delete,
since my HD is so clogged that the computer is slowed down to almost
zero.)
The online recommendation I found for printing from the OS says to
copy it by hand(!) into the spreadsheet or text file.
Anyone know how to get at least a text file of the name and the
Creation Date? As automatically as possible?
(P.S. OS X 10.13 because I'm dubious about putting anything later on
my late-2013 MacBook Pro, and I can't afford a new computer right now.)
DiskTracker can catalogue a disk/folder and then you can print or export
the list, but it's not free.
<http://www.portents.com/disktracker/>
I haven't used any of these, but other possibiities might be:
- VVV (Virtual Volumes View) - a free disk cataloguing app
<https://sourceforge.net/projects/vvvapp/>
- PrintWindow - not free Finder window printer app
<http://searchwaresolutions.com/default.html>
- DiskCatalogMaker - not free disk cataloguing app
<https://diskcatalogmaker.com>
There are also some Finder replacement apps which may or may not be able
to print/export their listing windows, but I've never tried any of those.
On 2024-04-30, Dudley Brooks <dbrooks@runforyourlife.org> wrote:
On 4/30/24 8:56 AM, Jolly Roger wrote:
On 2024-04-30, Jim Gibson <jimsgibson@gmail.com> wrote:
On Apr 29, 2024 at 6:51:05 PM PDT, "Dudley Brooks"
<dbrooks@runforyourlife.org> wrote:
I want to print out all the File Names, their Creation Dates, and their >>>>> Modification Dates. (Printing all the other info is fine too.) IfYou can use the stat utility in a command-line shell in the Terminal
possible, I would like to do it in a form that can be easily put into a >>>>
application to print out creation and modification times for any file. >>>>
Use 'man stat' for details. Use the -f option to specifiy the content and >>>> format for the fields to be displayed.
You want the following format specifiers:
%SN to display the file name
%SB to display the creation (birth) time
%Sm to display the modification time
%t to insert tab characters between fields
So the following should give you what you want:
stat -f '%SN%t%SB%t%Sm' *
Redirect the output to a file:
stat -f '%SN%t%SB%t%Sm' * > file_times.txt
and you can import that into a spreadsheet specifying tab characters to >>>> separate columns,
Thanks! That's EXACTLY what I'm looking for.
Ironically, I had actually done "man stat" ... but I didn't see all
those formatting parameters. I must have been looking way too late at
night ... when my brain turns into a pumpkin.
I would use comma characters for delimiters to make it a CSV file, then
open that in a spreadsheet program.
I was just thinking about that. Thanks! (I think Excel can separate on
tabs as well, though. But it's always good to have different options.
And maybe it saves you from having to do copy-and-paste.)
One more thing, if either of you knows why this might be:
If <filename> has not already been created, I get an error message.
If I create <filename> first, there's no error message, and it seems to
be running fine ... except ... it doesn't seem to do anything -- nothing
gets written to <filename>!
Any ideas? Maybe it's another casualty of over-full HD?
What is the command you are using,
and what is the error output?
On 2024-05-02, Jolly Roger <jollyroger@pobox.com> wrote:
On 2024-05-02, Dudley Brooks <dbrooks@runforyourlife.org> wrote:
On 4/30/24 3:56 PM, Jolly Roger wrote:
On 2024-04-30, Dudley Brooks <dbrooks@runforyourlife.org> wrote:
On 4/30/24 8:56 AM, Jolly Roger wrote:
I would use comma characters for delimiters to make it a CSV file, >>>>>> then open that in a spreadsheet program.
I was just thinking about that. Thanks! (I think Excel can
separate on tabs as well, though. But it's always good to have
different options. And maybe it saves you from having to do
copy-and-paste.)
One more thing, if either of you knows why this might be:
If <filename> has not already been created, I get an error message.
If I create <filename> first, there's no error message, and it seems >>>>> to be running fine ... except ... it doesn't seem to do anything --
nothing gets written to <filename>!
Any ideas? Maybe it's another casualty of over-full HD?
What is the command you are using,
Exactly what Jim Gibson suggested:
stat <flags, etc.> * > <file>
I'm asking for the exact command you are using, verbatim.
and what is the error output?
Today, when <file> doesn't exist, no error message. Can't recreate
error message from yesterday. (Maybe because I cleared a lot of stuff
off my HD?)
You don't remember what the message was?
I just tried this command in my home directory and it works fine
regardless of whether the file exists:
# stat -f '%SN,%SB,%Sm' * > file_times.txt
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 991 |
Nodes: | 10 (1 / 9) |
Uptime: | 131:03:00 |
Calls: | 12,960 |
Calls today: | 2 |
Files: | 186,574 |
Messages: | 3,266,055 |