09-24-2009
Your solutions don't work because they don't work or because they increase the load too much on the production system?
I would probably test whatever solution on a test pair of directories that you hand build so you can see if the solution is working or not.
If it is a load issue, try using the 'nice' command to lower the priority of your process.
rsync would probably work as well, but I would test a lot on sample data to make sure it's doing what you want.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi!
I have thousands of sub-directories, and hundreds of thousands of files in them. What is the fast way to find out which files are older than a certain date? Is the "find" command the fastest? Or is there some other way?
Right now I have a C script that traverses through and checks... (5 Replies)
Discussion started by: sreedharange
5 Replies
2. Shell Programming and Scripting
I'm trying to put together a shell script that will append specific prefixes based on the content of filenames. I think I have this part down. However, I want to append before that part a process that will remove the current prefix before it renames the files with the new prefix.
For example,... (6 Replies)
Discussion started by: HLee1981
6 Replies
3. UNIX for Dummies Questions & Answers
I have a problem where tar is somehow creating duplicate filenames when tarring a directory. Doing an ls on the directory does not show any duplicate filenames, yet when the directory is tarred, you can see that there are duplicates:
bash-2.03# pwd
/var/log/cricket
bash-2.03# ls -1 | sort |... (2 Replies)
Discussion started by: dangral
2 Replies
4. Shell Programming and Scripting
Hi,
I have file which users like
filename ->"readfile", following entries
peter
john
alaska
abcd
xyz
and i have directory /var/
i want to do first cat of "readfile" line by line and first read peter in variable and also cross check with /var/ how many directories are avaialble... (8 Replies)
Discussion started by: learnbash
8 Replies
5. Shell Programming and Scripting
I have a large list of filenames from an Excel sheet, which I then translate into a simple text file. I'd like to use this list, which contains various file extensions , to archive these files and then remove them recursively through multiple directories and subdirectories. So far, it looks like... (5 Replies)
Discussion started by: fxvisions
5 Replies
6. Shell Programming and Scripting
below is the script to rename filenames ending with .pdf extension.
I want the script to enter directories and search for all pdf and then if it is in the format file_amb_2008.pdf , then change it to 2008_amb_file.pdf, and this script should work only for .pdf files.
help required to make the... (12 Replies)
Discussion started by: deaddevil
12 Replies
7. Shell Programming and Scripting
Hi Gurus,
Do any kind souls encounter have the same script as mentioned here.
Find and compare filenames in different mount point and remove duplicates.
Thanks a million!!!
wanna13e (7 Replies)
Discussion started by: wanna13e
7 Replies
8. UNIX for Dummies Questions & Answers
I have noticed that the same folder (and contents) lives in
/u/public and /usr/public
Question was this put here intentionally or by accident?
Its 31Gb in size and on a 72Gb HDD that leaves little room for apps.
It is a nework shared drive for all to access e.g. p: points to... (0 Replies)
Discussion started by: moondogi
0 Replies
9. Shell Programming and Scripting
Hi,
I have files like below, In files coming as spaces. Before transfering those files into ftp server. I want to remove the spaces and then can transfer the files into unix server.
e.g: filenames are
1) SHmail _profile001_20120908.txt
2) SHmail_profile001 _20120908.txt
3) sh... (3 Replies)
Discussion started by: kirankumar
3 Replies
10. Shell Programming and Scripting
Is there a way via some bash script or just cmd to find duplicate directories?
i have main folders:
TEST1
TEST2
In folder TEST1 is some amount of same folders as in folder TEST2
can be this done? i tried fdupe but it only search for dupe files not whle dirs
thx! (8 Replies)
Discussion started by: ZerO13
8 Replies
LEARN ABOUT DEBIAN
mimedefang.pl
MIMEDEFANG.PL(8) System Manager's Manual MIMEDEFANG.PL(8)
NAME
mimedefang.pl - Perl script to scan MIME messages.
SYNOPSIS
mimedefang.pl [-f filter] dir
DESCRIPTION
mimedefang.pl is a Perl script designed to work with mimedefang(8). It takes a single argument which is a directory which should contain
files laid out as described in mimedefang(8).
OPTIONS
-f filter
Specifies the name of the file containing the filter. If this option is omitted, the default filter /etc/mimedefang-filter is used.
OPERATION
mimedefang.pl evaluates the file /etc/mimedefang-filter as a Perl fragment. This file should define the filter procedure. For each part
of a MIME message, mimedefang.pl calls filter and disposes of the part as instructed by the filter. The various modes of disposition are
described in mimedefang-filter(5).
TESTING FILTERS
You are strongly recommended to test your filter before installing it in /etc/mimedefang-filter. To test the filter, save it in a file
(e.g. test-filter) and run this command:
mimedefang.pl -f test-filter -test
This tests the filter for syntactic correctness. If it passes, you can install it as a production filter. (Note that the test tests only
for correct Perl syntax; it doesn't make sure your filter does something sensible.)
MISCELLANEOUS OPTIONS
There are a few other ways to invoke mimedefang.pl:
mimedefang.pl -structure < mime_message
parses a message on stdin and prints lots of debugging information.
mimedefang.pl -prettyprint < mime_message
parses a message on stdin and prints it in a "nice" format (depending on your definition of "nice".)
mimedefang.pl -features
prints a list of detected optional Perl modules. The output looks something like this:
SpamAssassin: yes
mimedefang.pl -validate
calls the function filter_validate, if it is defined in your filter. filter_validate should return an integer; this becomes the exit code.
If filter_validate does not exist, an error message is printed and mimedefang.pl exits with an exit code of 1.
AUTHOR
mimedefang.pl was written by David F. Skoll <dfs@roaringpenguin.com>. The mimedefang home page is http://www.mimedefang.org/.
SEE ALSO
mimedefang(8), mimedefang-filter(5), mimedefang-protocol(7)
4th Berkeley Distribution 8 February 2005 MIMEDEFANG.PL(8)