list all files except .xml files
hi
i want to list all files except .xml files. |
ls | grep -v *.xml?
|
Quote:
|
Quote:
|
Code:
ls --hide=*.xml |
could u please tell me how grep could be used in finding files.
|
You don't use grep to find files, you use it to find patterns.
|
Quote:
Code:
ls | grep -v file1.xml file2.xml file3.xml |
Quote:
Code:
[robert@localhost ~]$ ls --hide=*.xml |
Ahh, that makes sense!
|
Quote:
|
Quote:
Have you tried to use quotes? ls --hide="*.xml" or even Code:
ls '--hide=*.xml' |
i have many files in my directory. i want to display all files except files with .xml extension.i am using RHEL4.
|
Quote:
Code:
ls --hide=*.xml |
Following the suggestion by Nylex, you can try
Code:
ls | grep -v [.]xml$ |
All times are GMT -5. The time now is 09:01 AM. |