02-05-2010
Quote:
Originally Posted by
cmf1985
I'm beginning to get a bit confused about what you want... Do you want to have the same files on the mail server and the backup server (as in, get a list of all the files currently on the mail server and delete from the backup server anything that's not in that list)?
Yes.
for e,g if I have xyz & abc on mailserver and xyzRS , xyzR , xyz , abcRSF , abcR, abc
on the backup server. then
xyzRS , xyzR , abcRSF, abcR must be deleted from the backup server.
Eventually on mailserver : xyz & abc
and on backup server : xyz & abc
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: asinha63
1 Replies
2. Shell Programming and Scripting
I need help with a script which accepts one argument and goes through all the files under a directory and prints a list of possible duplicate files As its output, it prints zero or more lines, each one containing a space-separated list of filenames. All the files listed on one line have the same... (1 Reply)
Discussion started by: trueman82
1 Replies
3. Shell Programming and Scripting
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)
Discussion started by: lowmaster
8 Replies
4. Shell Programming and Scripting
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)
Discussion started by: spangberg
1 Replies
5. Shell Programming and Scripting
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)
Discussion started by: jaysunn
5 Replies
6. Shell Programming and Scripting
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)
Discussion started by: arvindng
3 Replies
7. Shell Programming and Scripting
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)
Discussion started by: raidzero
19 Replies
8. Shell Programming and Scripting
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)
Discussion started by: corfuitl
5 Replies
9. Windows & DOS: Issues & Discussions
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)
Discussion started by: pasc
1 Replies
10. Shell Programming and Scripting
TARGET_DIR='/media/andy/MAXTOR_SDB1/Ubuntu_Mate_18.04/'
REGEX='{4}-{2}-{2}_{2}:{2}' # regular expression that match to: date '+%Y-%m-%d_%H:%M'
LATEST_FILE="$(ls "$TARGET_DIR" | egrep "^${REGEX}$" | tail -1)"
find "$TARGET_DIR" ! -name "$LATEST_FILE" -type f -regextype egrep -regex... (7 Replies)
Discussion started by: drew77
7 Replies
LEARN ABOUT XFREE86
backup_addhost
BACKUP_ADDHOST(8) AFS Command Reference BACKUP_ADDHOST(8)
NAME
backup_addhost - Adds a Tape Coordinator entry to the Backup Database
SYNOPSIS
backup addhost -tapehost <tape machine name>
[-portoffset <TC port offset>]
[-localauth] [-cell <cell name>] [-help]
backup addh -t <tape machine name>
[-p <TC port offset>]
[-l] [-c <cell name>] [-h]
DESCRIPTION
The backup addhost command creates a Tape Coordinator entry in the Backup Database. The entry records
o The host name of the Tape Coordinator machine where the Tape Coordinator (butc) process runs, as specified with the -tapehost argument.
o The Tape Coordinator's port offset number, as specified with the -portoffset argument. An entry for the port offset must also appear in
the /var/lib/openafs/backup/tapeconfig file on the Tape Coordinator machine, where it is mapped to a UNIX device name (for a tape
device) or pathname (for a backup data file).
Each Tape Coordinator must have its own port offset number, and the command fails if a Backup Database entry already exists for the
requested port offset number. To display existing Tape Coordinator entries, use the backup listhosts command.
OPTIONS
-tapehost <tape machine name>
Specifies the fully-qualified hostname of the machine for which to create a Tape Coordinator entry in the Backup Database. The machine
must have an entry in either the cell's naming service (such as the Domain Name Service) or the host file (/etc/hosts or equivalent) on
the machine where the command is issued.
-portoffset <TC port offset>
Specifies the Tape Coordinator's port offset number. Provide an integer from the range 0 through 58510, or omit this argument to use
the default value of 0 (zero). The value must match the port offset number recorded for the same combination of Tape Coordinator and
tape device or file in the /var/lib/openafs/backup/tapeconfig file on the Tape Coordinator machine named by the -tapehost argument.
-localauth
Constructs a server ticket using a key from the local /etc/openafs/server/KeyFile file. The backup command interpreter presents it to
the Backup Server, Volume Server and VL Server during mutual authentication. Do not combine this flag with the -cell argument. For more
details, see backup(8).
-cell <cell name>
Names the cell in which to run the command. Do not combine this argument with the -localauth flag. For more details, see backup(8).
-help
Prints the online help for this command. All other valid options are ignored.
EXAMPLES
The following command creates an entry in the Backup Database that assigns port offset number 4 to a Tape Coordinator running on the
machine "backup1.abc.com":
% backup addhost -tapehost backup1.abc.com -portoffset 4
The following command creates a Backup Database entry that assigns port offset number 0 to a Tape Coordinator on the machine
"backup3.abc.com":
% backup addhost backup3.abc.com
PRIVILEGE REQUIRED
The issuer must be listed in the /etc/openafs/server/UserList file on every machine where the Backup Server is running, or must be logged
onto a server machine as the local superuser "root" if the -localauth flag is included.
SEE ALSO
backup(8), backup_delhost(8), backup_listhosts(8)
COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas
Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.
OpenAFS 2012-03-26 BACKUP_ADDHOST(8)