Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Unselect Files ---need help  (Read 4486 times)

0 Members and 1 Guest are viewing this topic.

arz_razi

  • Guest
Unselect Files ---need help
« on: January 25, 2007, 06:48:58 PM »
Hi.. I have a problem on filtering the data in unix

The files is
         abc.done
         gba.done  
         a.txt
         c.txt
         b.sh
         <any file that doesnt have .done extension>

How can is select all the files without selcting the file that have extension of .done .
How can is use 'll or ls' command to unselect .done data.

$ll -lrt <to unselect .done data>

Please help me as i'm new in UNIX envoirement.
Thank YOu

ghostdog74



    Specialist

    Thanked: 27
    Re: Unselect Files ---need help
    « Reply #1 on: January 26, 2007, 05:04:43 AM »
    If your ls version have a --hide option,
    Code: [Select]
    ls -ltr --hide=*.done

    or you can use combination of ls and grep
    Code: [Select]
    ls -ltr |grep -v ".done"

    or you can use find command
    Code: [Select]
    find . -maxdepth 1 -not -name "*.done" #find only current directory


    arz_razi

    • Guest
    Re: Unselect Files ---need help
    « Reply #2 on: January 28, 2007, 06:15:14 PM »
    Thanks. Really appreciated. I've settled my problem based on ur guide

    Rob Pomeroy



      Prodigy

    • Systems Architect
    • Thanked: 124
      • Me
    • Experience: Expert
    • OS: Other
    Re: Unselect Files ---need help
    « Reply #3 on: January 29, 2007, 02:24:08 PM »
    ...and no doubt got full marks on your class assignment...  ;)
    Only able to visit the forums sporadically, sorry.

    Geek & Dummy - honest news, reviews and howtos

    ghostdog74



      Specialist

      Thanked: 27
      Re: Unselect Files ---need help
      « Reply #4 on: February 01, 2007, 06:10:49 PM »
      Quote
      ...and no doubt got full marks on your class assignment...  ;)
      hmm..didn't know that. my bad