The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




Thread: ls command help
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 10-23-2006
Glenn Arndt's Avatar
Glenn Arndt Glenn Arndt is offline Forum Advisor  
Anomalous Lurker
  
 

Join Date: Feb 2006
Location: Indianapolis, IN
Posts: 255
Are you allowed to use "cut"?
Code:
ls -1 /etc/magic /sbin/fsck /boot/grub/menu.lst /usr/share/games/wombat /var/cache/man/index.db /usr/bin/defcon 2>&1 1>existingFiles | cut -d" " -f1 >nonexistingFiles

If not, try
Code:
ls -1 /etc/magic /sbin/fsck /boot/grub/menu.lst /usr/share/games/wombat /var/cache/man/index.db /usr/bin/defcon 2>&1 1>existingFiles 2>nonexistingFiles

The drawback there is that instead of a simple list of files in "nonexistingFiles", you'll have a list like:
Code:
/boot/grub/menu.lst not found
/var/cache/man/index.db not found