English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

In UNIX, we use ls *.xyz to list files with that extension. How can I list files without that extension?
I tried ls !*.xyz and ls ![*.xyz]
Thanks in advance!

2006-07-23 18:24:01 · 2 answers · asked by vrsuresh1977 2 in Computers & Internet Computer Networking

2 answers

It sounds like what you really want is the "find" command. Try this:

$ find * -maxdepth 0 -not -name '*.xyz' -print

2006-07-27 08:43:53 · answer #1 · answered by BalRog 5 · 2 0

if you could rename the targetted file to begin with a .

i.e.

.newfile

these files are not listed when using ls, you must use ls -a to discover them. files that begin with a . in the filename are hidden files.

2006-07-24 05:50:45 · answer #2 · answered by jessindallas 2 · 0 1

fedest.com, questions and answers