LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-19-2011, 09:48 PM   #1
Shay
Member
 
Registered: Sep 2003
Posts: 77

Rep: Reputation: 15
alias find to always skip a specific absolute path?


I've read about purge, but haven't found a way to alias find to always overlook a directory.

I have a directory: /home/Archive
that I would like to ignore, wherever I'm find-ing from.

Any ideas? Besides tar-ing the entire directory?

-Shay
 
Old 08-19-2011, 10:31 PM   #2
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
Something like 'find /home -path "/home/Archive" -prune -o <your find expression>' will ignore the /home/Archive directory.
It is more difficult to suggest an alias as you may want to specify the starting path.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change Absolute path to Relative path sahil.jammu Linux - Newbie 2 05-31-2011 04:57 AM
java applet not loading image with relative path but loads image with absolute path amolgupta Programming 2 07-20-2009 01:58 PM
Find path from file alias an_sush Linux - Newbie 2 02-12-2009 06:15 AM
Image Path reference in Linux (Absolute path) javabuddy Linux - General 7 06-05-2006 07:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration