The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-16-2008
shyjuezy shyjuezy is offline
Registered User
 

Join Date: May 2008
Posts: 9
Question list the files but exclude the files in subdirectories

If I execute the command "ls -l /export/home/abcde/dev/proj/code/* | awk -F' ' '{print $9}' | cut -d'/' -f6-8" it will list all the files in /export/home/abcde/dev/proj/code/ directory as well as the files in subdirectories also
proj/code/test.sh
proj/code/test1.c
proj/code/unix
proj/code/xml_db


CPP: SUBDIRECTORY
a.out
constr.cpp
fn_ptr.cpp
samp.cpp


MYSCRIPTS: SUBDIRECTORY
autoTest.sh
file2.txt
filenames.txt
filenames.txt


Is there any way to list only the files mentioned in path /export/home/abcde/dev/proj/code/ and should exclude all the files in subdirectories CPP and MYSCRIPTS
proj/code/test.sh
proj/code/test1.c
proj/code/unix
proj/code/xml_db

Thanks in advance...
Reply With Quote
Forum Sponsor