euglug.org

[Eug-lug] help with directory listing

작성자

카테고리:



AlanTue Mar 4 15:50:08 PST 2008

On Tue, March 4, 2008 3:46 pm, Rob Hudson wrote:
> I'll admit up front... I don't know my unix utility commands like I
> should.  Thinks like sed, awk, cut, sort, uniq, etc can all make for
> some powerful combinations.
>
> My goal via a shell script: Get the filename of the most recently modified
> file.
>
> I can do this:
>> ls -t
>
>

Assuming GNU:

ls -l | tail -1
ought to do it.

-ajb