[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: keeping the two latest files on a folder



On Thu, 15 Oct 2009, Matthew Smith wrote:

Quoth Boyd Stephen Smith Jr. at 14/10/09 23:12...
Your font has betrayed you. The single-column-mode option is "-1" (dash-one), your messages says you tried the option "-l" (dash-ell) which requested a
detailed (long) listing.

Aha! Sure looked like a lower-case L. Think I need to bump up the font size for this little screen! Thank you for pointing that out.

Unfortunately, I still can't get the desired effect.

The ls -1 (#1) gives me my single-column list but piping it to sed '1,2d' still gives me the entire directory listing, each item separated by a single space. Can't see any reason from the sed manpage why this should be and can't locate my awk & sed book (may have left it at last job.)

ls -1 |sed '1,2d'

gives me a single column.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net


Reply to: