4
votes
1answer
56 views

Finding the newest file in a directory with a million files

I'm currently using ls -t | head -1 to get the name of the newest file. But it takes a long time because my directory has a million files. I guess a chunk of time is lost unnecessarily in ls -t when ...
0
votes
3answers
183 views

what is the command for listing files/dirs recursively of specific directories

suppose in my current directory, I have 50 sub-directories. Now, I am interested only in about 20 of those sub-directories (whose names match a pattern). I would like to recursively list the contents ...
3
votes
1answer
96 views

Specific ls output

Right now I'm calling the the following command ls -R and am receiving an output like this: .: file.txt script.php ./dir: file.txt other.java Is it possible to get the output to look like this: ...