Sponsored Content
Top Forums Shell Programming and Scripting Using Grep Include/Exclude Files Post 302568620 by Chubler_XL on Thursday 27th of October 2011 08:56:54 PM
Old 10-27-2011
Try -mtime -1 instead of -mtime 0

Code:
find / -depth -mtime -1 -a \( -ipath '/home/testuser/.*' -prune -o -print \) | grep -f include.mydirs | grep -v -f exclude.mydirs

This User Gave Thanks to Chubler_XL For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

how to exclude the GREP command from GREP

I am doing "ps -f" to see my process. but I get lines that one of it represents the ps command itself. I want to grep it out using -v flag, but than I get another process that belongs to the GREP itself : I would like to exclude # ps -f UID PID PPID C STIME TTY TIME CMD... (2 Replies)
Discussion started by: yamsin789
2 Replies

2. UNIX for Advanced & Expert Users

grep source code and exclude comments

I often find myself grepping source code for a variable name and many times the name would be present in comment lines that I 'd prefer not to see. Do you guys know any tricks to filter out comments? Example: snippet of the source code /*** * type comment 1 ***/ void ... (7 Replies)
Discussion started by: migurus
7 Replies

3. Shell Programming and Scripting

grep a string with include next 100 line

Hi, I have a log file which has number of lines from that i have to grep a string like this 03:22:19,287 while greping this string i have to grep next lines to the maximum of finding the word (MORE...) the stack is like this ************* 22/11/2011 03:22:19,287 232290646 ERROR... (2 Replies)
Discussion started by: thelakbe
2 Replies

4. Shell Programming and Scripting

Grep for a srting & exclude two folders

Hi, Below is the command to grep for a string under grep -r "redeem" /home/tom Need to make it case insensitive and exclude logs & tmp folders under /home/tom directory in my Search. Need this in Linux. (1 Reply)
Discussion started by: mohtashims
1 Replies

5. Shell Programming and Scripting

Exclude dash in grep

Hi, I must be overlooking something, but I don't understand why this doesn't work. I'm trying to grep on a date, excluding all the lines starting with a dash: testfile: #2013-12-31 2013-12-31code: grep '^2013-12-31' testfileI'm expecting to see just the second line '2013-12-31' but I don't... (3 Replies)
Discussion started by: Subbeh
3 Replies

6. Red Hat

SFTP user include/exclude without preventing SSH login

I have been asked to see if we can restrict SFTP access to authorised users only. There will be business users who will log on with SSH, but they are locked into a menu. They will have write access to the production data to do their job, but we don't want them to have access to read/write the... (8 Replies)
Discussion started by: rbatte1
8 Replies

7. UNIX for Dummies Questions & Answers

Is there a good way to grep multiple directories without --include?

Hello. I consider myself a journeyman Unix user. I can handle most day to day tasks and have created some fairly complicated command queries, but this problem has defeated me so far. Any help would be greatly appreciated! We keep an archive in the file system with a directory structure in... (5 Replies)
Discussion started by: pauliesyllabic
5 Replies

8. Shell Programming and Scripting

Include information in certain columns using grep and awk

HI all, I have data in a file that looks like this: 1 HOW _ NNP NNP _ 3 nn _ _ 2 DRUGS _ NNP NNP _ 3 nn _ _ 3 ACT _ NNP NNP _ 0 null _ _ 4 : _ ... (3 Replies)
Discussion started by: owwow14
3 Replies

9. Shell Programming and Scripting

Rsync exclude & include?

hi I have a few folders and a few files , for example Directory A B C D E Files 1 2 3 4 5 I want B directory and "2" File that does not sync But other directories and file sync What is the solution ? Is there a way to sync time is under one minute? os centos 6.8 thanks... (5 Replies)
Discussion started by: mnnn
5 Replies

10. Shell Programming and Scripting

Exclude multiple lines using grep

Hi, I'm working on a shell script that reports service status on a database server. There are some services that are in disabled status that the script should ignore and only check the services that are in Enabled status. I output the service configuration to a file and use that information to... (5 Replies)
Discussion started by: senthil3d
5 Replies
BBACKUPD.CONF(5)						    Box Backup							  BBACKUPD.CONF(5)

NAME
bbackupd.conf - Box Backup client daemon configuration file SYNOPSIS
/etc/box/bbackupd.conf DESCRIPTION
AccountNumber The account number of this client. This is set by the admin of the store server. UpdateStoreInterval Specifies the interval between scanning of the local discs. To avoid cycles of load on the server, this time is randomly adjusted by a small percentage as the daemon runs. Defaults to 1 hour. MinimumFileAge Specifies how long since a file was last modified before it will be uploaded. Defaults to 6 hours. MaxUploadWait If a file is repeatedly modified it won't be uploaded immediately in case it's modified again. However it should be uploaded eventually. This is how long we should wait after first noticing a change. Defaults to 1 day. MaxFileTimeInFuture AutomaticBackup SyncAllowScript Use this to temporarily stop bbackupd from syncronising or connecting to the store. This specifies a program or script script which is run just before each sync, and ideally the full path to the interpreter. It will be run as the same user bbackupd is running as, usually root. The script prints either "now" or a number to STDOUT (and a terminating newline, no quotes). If the result was "now", then the sync will happen. If it's a number, then the script will be asked again in that number of seconds. For example, you could use this on a laptop to only backup when on a specific network. MaximumDiffingTime How much time should be spent on diffing files. DeleteRedundantLocationsAfter FileTrackingSizeThreshold DiffingUploadSizeThreshold StoreHostname The hostname or IP address of the bbstored(8) server. StorePort The port used by the server. Defaults to 2201. ExtendedLogging Logs everything that happens between the client and server. The bbackupd(8) client must also be started with -V. ExtendedLogFile LogAllFileAccess LogFile LogFileLevel CommandSocket Where the command socket is created in the filesystem. KeepAliveTime StoreObjectInfoFile NotifyScript The location of the script which runs at certain events. This script is generated by bbackupd-config(8). Defaults to /etc/box/bbackupd/NotifySysAdmin.sh. NotifyAlways CertificateFile The path to the client's public certificate. PrivateKeyFile The path to the client's private key. This should only be readable by root. TrustedCAsFile The Certificate Authority created by bbstored-certs(8). KeysFile The data encryption key. This must be kept safe at all costs, your data is useless without it! DataDirectory A directory to keep temporary state files. This is usually something like /var/bbackupd. Server This section relates to the running daemon. PidFile The location of the process ID file. Defaults to /var/run/bbackupd.pid. BackupLocations This section defines each directory to be backed up. Each entry must have at least a Path entry and, optionally, include and exclude directives. Multiple include and exclude directives may appear. Path The path to back up. ExcludeFile Exclude a single file. ExcludeFilesRegex Exclude multiple files based on a regular expression. See re_format(7). ExcludeDir Exclude a single directory. ExcludeDirsRegex Exclude multiple directories based on a regular expression. See re_format(7). AlwaysIncludeFile Include a single file from a directory which has been excluded. AlwaysIncludeFilesRegex Include multiple files from an excluded directory, based on a regular expression. AlwaysIncludeDir Include a single directory from a directory which has been excluded. AlwaysIncludeDirsRegex Include multiple directories from an excluded directory, based on a regular expression. EXAMPLES
The following is an example of a backup location: home { Path = /home ExcludeDir = /home/guest ExcludeDir = /home/[^/]+/tmp ExcludeFilesRegex = .*.(mp3|MP3)$ AlwaysIncludeFile = /home/someuser/importantspeech.mp3 } FILES
/etc/box/bbackupd.conf SEE ALSO
bbackupd(8), bbackupd-config(8), bbackupctl(8) AUTHORS
Ben Summers Per Thomsen James O'Gorman Box Backup 0.11 10/28/2011 BBACKUPD.CONF(5)
All times are GMT -4. The time now is 09:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy