lastest edited file
hi,
i have alot of files in "logs" directory and i want to print the name of the lastest updated... i searched over the internet and i found that i can do with "-nt"....however it didnt work for me... please, do you have any ideas? thanks in advance |
What about:
Code:
ls -1rt |tail -1 |
hi thanks it works...
however it prints the lastest updated file in the current folder and i want the lastest updated file in the sub folder "logs". how can i change your code to execute it? edit: i solved it thanks you |
Glad you managed to do it. If you think your problem has been solved you may mark this thread as solved (see thread tools at the top of the page).
|
Quote:
When you have a bit of time, please read How To Ask Questions The Smart Way. Also, if you figure out the solution yourself after posting, it's polite to post it. That way this thread may be able to help out other people with similar problems who come across it in later searches. |
All times are GMT -5. The time now is 05:10 PM. |