Computing.Net > Forums > Unix > Find skipping files

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Find skipping files

Reply to Message Icon

Name: lolo
Date: April 7, 2003 at 06:59:24 Pacific
OS: SOL 8
CPU/Ram: SPARC
Comment:

Hi,
How could i do with a find command to find all the the files of my dir, skipping *.gz, *.pid, *.sh ? I tried with -prune, but doesn't seems to work (and i am probably not good enough!!)
Thank's




Sponsored Link
Ads by Google

Response Number 1
Name: nails
Date: April 7, 2003 at 07:14:13 Pacific
Reply:

Hi:


# all on one line
find . -type f ! \( -name "*.gz" -o -name "*.sh" -o -name "*.pid" \) -print

Regards,

Nails


0

Response Number 2
Name: serot
Date: April 7, 2003 at 07:49:10 Pacific
Reply:

works fine.
Thank's.
Now, i just want to get, using you're command the files modified more than 1 one day ago.
I tried adding -mtime +1, but i get all files....
Have an idea?
Thank you


0

Response Number 3
Name: nails
Date: April 7, 2003 at 10:04:48 Pacific
Reply:

Hi:

-mtime +1 should work. It works on my solaris 7 system. Keep in mind that -mtime +1 is actually files more than 24 hours.

If today's April 7 at 1000, you won't find files with a modification time of April 6 at 1700.

Regards,

Nails


0

Response Number 4
Name: lolo
Date: April 8, 2003 at 02:35:13 Pacific
Reply:

It's Ok.
Thank you. (i think i was tired!!)


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


shell script help please Create a file with a path...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Find skipping files

who to find a file! www.computing.net/answers/unix/who-to-find-a-file/2493.html

find all files that contain www.computing.net/answers/unix/find-all-files-that-contain-/2199.html

finding new files www.computing.net/answers/unix/finding-new-files/1805.html