home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / shell / 5216 < prev    next >
Encoding:
Text File  |  1992-12-31  |  769 b   |  21 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!malgudi.oar.net!caen!uwm.edu!spool.mu.edu!umn.edu!csus.edu!netcom.com!kasajian
  3. From: kasajian@netcom.com (Kenneth Kasajian)
  4. Subject: cp
  5. Message-ID: <1992Dec31.221946.22162@netcom.com>
  6. Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
  7. Date: Thu, 31 Dec 1992 22:19:46 GMT
  8. Lines: 11
  9.  
  10.  
  11. How do I copy all the files in the current directory into a subdirectory
  12. name 'sub'.  I do :
  13. cp * sub/
  14. but then it tries to copy all the subdirectories as well.  I've tried
  15. doing :
  16. cp `find . -type f -print` sub/
  17. but find finds all files below the current, not just the current directory.
  18. I guess I can use ls, but how do I get ls to only display the files only
  19. and not directories?
  20.  
  21.