Posted By

qrist0ph on 10/19/08


Tagged

Bash sysadmin


Versions (?)

Find first N Files in a Directory


 / Published in: Bash
 

  1. destination=./
  2. anzahl=1
  3. dateien=$(ls -St -w1 $destination | egrep "*" | sed -n -e '1,1p')
  4. for i in $dateien;
  5. do
  6. echo $destination$i;
  7. done

Report this snippet  

You need to login to post a comment.