e
I want to make a text file listing all the files in a folder. I would also like to have the listed files sorted by ascending creation date, in apostrophes, and have the word "file" before the file directory.
How do I do this in Termux?
24 Replies
you can use
find
, sort
, and sed
to do that
Alright.

e
two simple ways

or if you just want to run
file
command on all files:
@TomIO might choke you if you use
ls
but yeah it's the simple wayAs long as it's not going in a script it's okay.
But you're gonna need to do
file $(ls -At)
if you're not using Fish.
as tom said use
$()
not ()
This is what I got, and that is not what my files are called.

The filename for a single file (eg, Set3P5) is "Excepter - Set 3 Part 5: A Buoy Report [240391151].wav"
And the list is also not in order of ascending creation date
Any fixes for that?
try the second and use
"
at end not '
so
file '/path/to/file1 name2.wav"
?
oh, oke
I get nothing

Actually nevermind. Works now, but the files are put in the reverse order

But I can just find an online tool to help. A fix is a fix after all, and thanks for the fix.
ls -Art
should print in reversepipe it to tac
Yeah I found a solution already. An online tool, like I said yesterday.
cool
And I'm surprised this post did not close, and I did push the button.