[Cialug] List file types in a directory

Chris Freeman cwfreeman at gmail.com
Thu Mar 8 16:25:56 CST 2007


Or:

ls -l | awk -F. '{print $NF}' | sort -u

if you have more than one '.' in some files.

On 3/8/07, Daniel Juliano <dan at danandlaurajuliano.com> wrote:
>
> So, how would I get a list of file types for all files in a directory?
> Let's say I've got the following:
> test1.txt
> test2.txt
> test3.jpg
>
> I'd like something similar to:
> .txt
> .jpg
>
> Any ideas?
>
>
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cialug.org/pipermail/cialug/attachments/20070308/97820f7e/attachment.html


More information about the Cialug mailing list