"dir *.msf -t" prints a time ordered list of file with extension "msf".
"dir *.msf -t" prints a time ordered list of file with extension "msf".
I have two problems with result.
The format is 2 columns, I need a single column.
I would like to have a modification date associated with each filename.
https://manpages.debian.org/bookworm/coreutils/dir.1.en.html
wasn't helpful enough.
Suggestions?
TIA
Okay, this helps. Libre Office Writer has a block edit function that[...]
lets you choose a "block" of text. I used it to remove the first xxx
of this text file:
total 44
drwxr-xr-x 2 1000 1000 4096 Sep 19 18:25 Countertop
-rwxr-xr-x 1 1000 1000 151 Jan 14 2020 Countertop.txt
Then I was able to highlight and delete everything up to the date,
leaving me with this:
Sep 19 18:25 Countertop
Jan 14 2020 Countertop.txt
On 9/20/23 06:32, Richard Owlett wrote:
"dir *.msf -t" prints a time ordered list of file with extension "msf".
Not sure where you can go with this, but this is what I use for a
directory print out:
ls -n > filename.txt
This gives me: drwxr-xr-x 2 1000 1000 4096 Sep 19 18:25 Countertop
I am sure there is an editor that can delete the first xx characters of
each line. Just a thought.
On 09/20/2023 11:39 PM, azigni wrote:
On 9/20/23 06:32, Richard Owlett wrote:
"dir *.msf -t" prints a time ordered list of file with extension "msf".
Not sure where you can go with this, but this is what I use for a
directory print out:
ls -n > filename.txt
This gives me: drwxr-xr-x 2 1000 1000 4096 Sep 19 18:25 Countertop
I am sure there is an editor that can delete the first xx characters
of each line. Just a thought.
*THANK YOU!*
That lead me to the manual page for "ls" which led to
https://www.gnu.org/software/coreutils/ls
Reading that guided me to posing a better question.
An adequate command for my current need is
ls *.msf -t -l -n
As this is a personal machine, everything to the left of file size is an identical string, which allows easy removal.
That command is not applicable for a slightly more general case as "ls" outputs the clock time [but not year] if the file is less than 6 months
old. Time for a more detailed reading of "GNU Coreutils".
"dir *.msf -t" prints a time ordered list of file with extension "msf".
I have two problems with result.
The format is 2 columns, I need a single column.
I would like to have a modification date associated with each filename.
https://manpages.debian.org/bookworm/coreutils/dir.1.en.html
wasn't helpful enough.
Suggestions?
TIA
| Sysop: | Amessyroom |
|---|---|
| Location: | Fayetteville, NC |
| Users: | 65 |
| Nodes: | 6 (0 / 6) |
| Uptime: | 00:49:11 |
| Calls: | 862 |
| Files: | 1,311 |
| D/L today: |
10 files (20,373K bytes) |
| Messages: | 264,186 |