How to form a correct syntax to sift out according to complementary patterns with 'find'?
I need to find all files and folders containing keyword from the topmost directory deep down the tree but omitting all references to keyword in web-search logs and entries, i.e. excluding search and browsing history made using web-browser1, web-browser2, web-browser3, (bypassing all entries of the type "/Users/myuser/Library/web-browser1, 2, 3/History/keyword/blahblahblah" etc. )
I use
So far it only gets right the first half of this expression (ending with keyword) but fails to execute the second half. I tried using grep -v piping the first half of the original expression to it instead with the same argument, I modified it to
only to end up with the same result (all entries with the paths, each containing keyword). What I'm doing wrong? Is it possible to do complementary match with find or maybe I failed to arrange the regular expression correctly?
Last edited by scrutinizerix; 01-17-2018 at 04:51 PM..
Problem: I have a shell script that will be called by a Perl module that will connect to a db and delete rows. The Perl module will be called by CRON. I am using a Perl module to call a shell script because I need to get the db connection from Perl.
Here is the Perl pseudocode:
... (4 Replies)
Dear all
I am still bit new in shell script area.I am writing down a shell script which I guess somewhere wrong so please kindly correct it. I would be greatful for that.
What I actually want from this shell script is that it will move all the files one by one to another server which can be... (2 Replies)
i've looked at a bunch of the date comparison threads on these boards but unfortunately not been able to figure this thing out yet. still confused by some of the way conditionals handle variables...
here is what i where i am now...
# a bunch of initializition steps are here ...... (1 Reply)
Hi,
I want to check if file(s) exist even in subdirectories and perform an action. After searching here couldn't find solution that would work, but made my own solution that works fine:
if
then
echo
egrep "$1|$2|$3" `find| grep MLOG`
else
echo "MLOG does not exist"
fiThat will check... (1 Reply)
I tried with sed command to create a space between namespace from the XML file. I used this syntax. Can someone tell me is this syntax is vaild?
/usr/xpg4/bin/sed -e 's/<\/^.*><^.:Errort>/<\/^.*> <^.:Errort>/g' test > test2
I dint find any changes or any space being created between... (10 Replies)
file contents looks like this :
#START
line1 of record1
line2 of record1
#END
#START
line1 of record2
line2 of record2
line3 of record2
#END
#START
line1 of record3
#END
my question how should i make it a records between #START and #END .
willl i be able to get the contents of the... (5 Replies)
Hi,
I am trying to extract some patterns from a line. The input file is space delimited and i could not use column to get value after "IN" or "OUT" patterns as there could be multiple white spaces before the next digits that i need to print in the output file . I need to print 3 patterns in a... (3 Replies)
I have a file name :
var=UsrAccChgRpt
I want to make them upper case.
Tried:
$var | tr
Error:
tr: Invalid combination of options and Strings.
Usage: tr | -ds | -s | -ds | -s ] String1 String2
tr { -d | -s | -d | -s } String1
Could you please help. I am using AIX... (2 Replies)
Hello.
For a given folder, I want to select any files find $PATH1 -f \( -name "*" but omit any files like pattern name ! -iname "*.jpg" ! -iname "*.xsession*" ..... \) and also omit any subfolder like pattern name -type d \( -name "/etc/gconf/gconf.*" -o -name "*cache*" -o -name "*Cache*" -o... (2 Replies)
Hello,
Using Bash on Mac OS X 10.7.5 (Lion). I downloaded a GrowlSafari plugin for Webkit from its GitHub page GitHub - uasi/growl-safari-bridge: GrowlSafariBridge enables arbitrary javascript (including Safari Extensions) to notify via Growl.. In the description it says that after installing for... (0 Replies)
Discussion started by: scrutinizerix
0 Replies
LEARN ABOUT SUSE
ausearch_add_timestamp_item
AUSEARCH_ADD_TIMESTAMP_ITEM(3) Linux Audit API AUSEARCH_ADD_TIMESTAMP_ITEM(3)NAME
ausearch_add_timestamp_item - build up search rule
SYNOPSIS
#include <auparse.h>
int ausearch_add_timestamp_item(auparse_state_t *au, const char *op, time_t sec, unsigned milli, ausearch_rule_t how)
DESCRIPTION
ausearch_add_timestamp_item adds an event time condition to the current audit search expression. The search conditions can then be used to
scan logs, files, or buffers for something of interest. The op parameter specifies the desired comparison. Legal op values are <, <=, >=, >
and =. The left operand of the comparison operator is the timestamp of the examined event, the right operand is specified by the sec and
milli parameters.
The how value determines how this search condition will affect the existing search expression if one is already defined. The possible val-
ues are:
AUSEARCH_RULE_CLEAR
Clear the current search expression, if any, and use only this search condition.
AUSEARCH_RULE_OR
If a search expression E is already configured, replace it by (E || this_search_condition).
AUSEARCH_RULE_AND
If a search expression E is already configured, replace it by (E && this_search_condition).
RETURN VALUE
Returns -1 if an error occurs; otherwise, 0 for success.
APPLICATION USAGE
Use ausearch_add_item(3) and ausearch_add_interpreted_item(3) to add conditions that check audit record fields. Use ausearch_add_expres-
sion(3) to add complex search expressions using a single function call.
SEE ALSO ausearch_add_expression(3), ausearch_add_item(3), ausearch_add_interpreted_item(3), ausearch_add_regex(3), ausearch_set_stop(3), ause-
arch_clear(3), ausearch_next_event(3), ausearch-expression(5).
AUTHOR
Miloslav Trmac
Red Hat Nov 2007 AUSEARCH_ADD_TIMESTAMP_ITEM(3)