Hi ppl.
I have to check for duplicate files in a directory .
the directory has following files
/the/folder /containing/the/file
a1.yyyymmddhhmmss
a1.yyyyMMddhhmmss
b1.yyyymmddhhmmss
b2.yyyymmddhhmmss
c.yyyymmddhhmmss
d.yyyymmddhhmmss
d.yyyymmddhhmmss
where the date time stamp can be... (1 Reply)
Hi,
is it possible to remove all duplicate lines from all txt files in a specific folder?
This is too hard for me maybe someone could help.
lets say we have an amount of textfiles 1 or 2 or 3 or... maximum 50
each textfile has lines with text.
I want all lines of all textfiles... (8 Replies)
Hi
I have been struggling with a script for removing duplicate messages from a shared mailbox.
I would like to search for duplicate messages based on the “Message-ID” string within the messages files.
I have managed to find the duplicate “Message-ID” strings and (if I would like) delete... (1 Reply)
Hi all.
Am doing continuous backup of mailboxes using rsync.
So whenever a new mail arrives it is automatically copied on backup server.
When a new mail arrives it is named as xyz:2, when it is read by the email client an S is appended xyz:2,S
Eventually , 2 copies of the same file exist on... (7 Replies)
Hello,
I wrote a basic script that works however I am was wondering if it could be sped up. I am comparing files over ssh to remove the file from the source server directory if a match occurs. Please Advise me on my mistakes.
#!/bin/bash
for file in `ls /export/home/podcast2/"$1" ` ; do
... (5 Replies)
Dear All,
I have multiple files having number of records, consist of more than 10 columns some column values are duplicate and i want to remove these duplicate values from these files.
Duplicate values may come in different files.... all files laying in single directory..
Need help to... (3 Replies)
Hello again, I am wanting to remove all duplicate blocks of XML code in a file. This is an example:
input:
<string-array name="threeItems">
<item>item1</item>
<item>item2</item>
<item>item3</item>
</string-array>
<string-array name="twoItems">
<item>item1</item>
<item>item2</item>... (19 Replies)
Hi,
In a directory, e.g. ~/corpus is a lot of files and subdirectories. Some of the files are named:
12345___PP___0902___AA.txt
12346___PP___0902___AA. txt
12347___PP___0902___AA. txt
The amount of files varies. I need to keep the highest (12347___PP___0902___AA. txt) and remove... (5 Replies)
So, I have text files,
one "fail.txt"
And one
"color.txt"
I now want to use a command line (DOS) to remove ANY line that is PRESENT IN BOTH from each text file.
Afterwards there shall be no duplicate lines. (1 Reply)
This is related to my post on backup up files.
I really appreciate all the help too. :-)
I would like to delete all but the 3 newest files in my backup directory.
/media/andy/MAXTOR_SDB1/Ubuntu_Mate_18.04/
For example
Ubuntu_Documents.zip_09Aug2018_12_00... (2 Replies)
Discussion started by: drew77
2 Replies
LEARN ABOUT CENTOS
fail2ban-regex
FAIL2BAN-REGEX(1) User Commands FAIL2BAN-REGEX(1)NAME
fail2ban-regex - test Fail2ban "failregex" option
SYNOPSIS
fail2ban-regex [OPTIONS] <LOG> <REGEX> [IGNOREREGEX]
DESCRIPTION
Fail2Ban reads log file that contains password failure report and bans the corresponding IP addresses using firewall rules.
This tools can test regular expressions for "fail2ban".
LOG:
string a string representing a log line
filename
path to a log file (/var/log/auth.log)
"systemd-journal"
search systemd journal (systemd-python required)
REGEX:
string a string representing a 'failregex'
filename
path to a filter file (filter.d/sshd.conf)
IGNOREREGEX:
string a string representing an 'ignoreregex'
filename
path to a filter file (filter.d/sshd.conf)
OPTIONS --version
show program's version number and exit
-h, --help
show this help message and exit
-c CONFIG, --config=CONFIG
set alternate config directory
-d DATEPATTERN, --datepattern=DATEPATTERN
set custom pattern used to match date/times
--timezone=TIMEZONE, --TZ=TIMEZONE
set time-zone used by convert time format
-e ENCODING, --encoding=ENCODING
File encoding. Default: system locale
-r, --raw
Raw hosts, don't resolve dns
--usedns=USEDNS
DNS specified replacement of tags <HOST> in regexp ('yes' - matches all form of hosts, 'no' - IP addresses only)
-L MAXLINES, --maxlines=MAXLINES
maxlines for multi-line regex.
-m JOURNALMATCH, --journalmatch=JOURNALMATCH
journalctl style matches overriding filter file. "systemd-journal" only
-l LOG_LEVEL, --log-level=LOG_LEVEL
Log level for the Fail2Ban logger to use
-v, --verbose
Increase verbosity
--verbosity=VERBOSE
Set numerical level of verbosity (0..4)
--verbose-date, --VD
Verbose date patterns/regex in output
-D, --debuggex
Produce debuggex.com urls for debugging there
--print-no-missed
Do not print any missed lines
--print-no-ignored
Do not print any ignored lines
--print-all-matched
Print all matched lines
--print-all-missed
Print all missed lines, no matter how many
--print-all-ignored
Print all ignored lines, no matter how many
-t, --log-traceback
Enrich log-messages with compressed tracebacks
--full-traceback
Either to make the tracebacks full, not compressed (as by default)
AUTHOR
Written by Cyril Jaquier <cyril.jaquier@fail2ban.org>. Many contributions by Yaroslav O. Halchenko and Steven Hiscocks.
REPORTING BUGS
Report bugs to https://github.com/fail2ban/fail2ban/issues
COPYRIGHT
Copyright (C) 2004-2008 Cyril Jaquier, 2008- Fail2Ban Contributors
Copyright of modifications held by their respective authors. Licensed under the GNU General Public License v2 (GPL).
SEE ALSO fail2ban-client(1)fail2ban-server(1)fail2ban-regex 0.10.2 January 2018 FAIL2BAN-REGEX(1)