List the files

Hi,

How do we list the files without .org files. For an example under test folder we have 100000 files out which we need to list the files like testfile.001,testfile.002,testfile.003 (i.e excluding org files)

testfile.001
testfile.001.org
testfile.002
testfile.002.org
....

ksh

ls -l !(*.org)

bash

shopt -s extglob
ls -l !(*.org)

zsh

ls -l ^*.org
[house@leonov] ls -1 . | grep -E '^test.[0-9]{3}$'
test.001
test.002

Thanks for your reply. We are using ksh and i tried as you suggested but am getting an error . Please advise
-bash: !: event not found

It appears that you're using bash, not ksh.
As I said, extended glob should be enabled:

shopt -s extglob 

Thats worked . Thanks Mr dr.house and thanks all.

find /test_folder/ -type f ! -name \*\.org -print