I gathered a list of zip in a remote disk using find /path/ -name *.zip > ~/ziplist.txt
.
~/ziplist.txt
look like this :
./path/to/the/file.zip
./path/to/the/file2.zip
./path/to/the/file3.zip
./path/to/the/very/nice/file.zip
I filtered this list using grep
and now that I have to correct list in a .txt
file, I would like to provide it to ls x --full-time
to gather their timestamp (x being the list of files).
Is it possible ?
I tried something like this : for f in tmp.txt do echo $( ls $f --full-time) done
EDIT : anothier thing I tried is : cat tmp.txt | sed- "s/\(.*\)/'\1'/" ; ls --full-time $(!!)
The sed
part is need since obviously there are space in file names...Otherwise, if files don't have spaces, this $(!!)
works just fine.
A solution that could work I guess is also ls -R --full-time | grep "what I want" > listfile.txt
but I think this will take a very long time to run. Having small steps is essential so I can check the list length for example, and because my disk access can be closed sometimes. Running find
already took me one hour.
Note : I'm on windows10 and use git bash to run commands, so I can't run elaborate .sh
scripts. I would prefer a single terminal entry to run it. I know, not the best configuration.