How to list a directory "all except"

Matt Graham mhgraham at crow202.org
Wed Aug 7 08:09:34 MST 2013


On 2013-08-07 08:04, joe at actionline.com wrote:
> ls -ltr *htm
> lists all [things] ending in 'htm'
> 
> But how could I list all contents excluding those ending in 'htm'?

By using grep as a filter:

ls -ltr | grep -v 'htm$'

-- 
Crow202 Blog: http://crow202.org/wordpress
There is no Darkness in Eternity
But only Light too dim for us to see.


More information about the PLUG-discuss mailing list