LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-06-2020, 04:04 AM   #1
shakespeare1
Member
 
Registered: Nov 2019
Location: Nokia, Finland.
Distribution: Xubuntu
Posts: 50

Rep: Reputation: Disabled
Ignore command (used with find)


I want a command which will ignore a particular directory. I have an Ubuntu machine with (uncaring) backups in the main disk.
 
Old 03-06-2020, 04:48 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,359
Blog Entries: 3

Rep: Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767
For rsync you'd have several ways, including the --filter option.

For find you'd also have several ways, including the -prune and -not options.

The details depend on specifics regarding your usage. Can you go into a little more detail into how the backup is being done using either find or rsync on your system?
 
Old 03-06-2020, 05:17 AM   #3
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by shakespeare1 View Post
I want a command which will ignore a particular directory
According to the question title, you want to ignore a directory when using find.

From the find manual page:
Quote:
To ignore a directory and the files under it, use -prune
 
Old 03-06-2020, 08:25 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,041

Rep: Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348Reputation: 7348
would be nice to give a better explanation or an example.
If you mean you want to skip a directory: https://linuxconfig.org/how-to-expli...mmand-s-search
 
1 members found this post helpful.
  


Reply

Tags
shell prompt



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What 'gdb' command are used to find out where mount command fails ? [/dev/sdb] Glenn D. Linux - Software 6 02-09-2016 08:24 AM
Telling find command to ignore directories LinuxGeek Linux - Software 10 08-17-2011 08:39 AM
find with execdir seems to ignore umask settings theking2 Linux - Security 2 04-02-2007 03:34 AM
Any arguement that can be used with 'ls' command to ignore case? davidas Linux - Newbie 5 02-26-2006 04:46 AM
[logcheck] ignore.d and logcheck.ignore cyberpunx Linux - Software 0 09-18-2005 05:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:14 PM.

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