Sponsored Content
Top Forums Shell Programming and Scripting Making a script to copy files not seen before (using md5sum) Post 302848727 by MR.bean on Thursday 29th of August 2013 11:39:47 PM
Old 08-30-2013
As far as I see, you only copy files that are not on the md5sum list. I do not see you are doing any md5sum check against the files though.

Actually you could just use --ignore-existing of rsync if you want to ignore the files that both exist in the source and destination directories.

Code:
rsync -avv --ignore-existing src/ des/

If you still want to keep track of that list and have the command that does the copying and excluding, you could use --exclude-from={PATH_TO_YOUR_LIST} of rsync

Last edited by MR.bean; 08-30-2013 at 04:27 AM..
 

10 More Discussions You Might Find Interesting

1. Solaris

making copy of 0 level dump via ufsdump

Hi how do u make "copy" of o level dump taken via ufsdumo in solaris? To elaborate, imagine you have taken a 0 level dump via the following command ufsdump 0ulf /dev/rmt/1n / and then again execute the same command to take a second 0 level dump Now take an incremental dump ufsdump 1ulf... (2 Replies)
Discussion started by: vishalsngh
2 Replies

2. Shell Programming and Scripting

Running md5sum on a list of files

Hello, I would like to run md5sum on a list of files saved in a text file, and save the result in another file. (ie. md5sum `cat list.txt` > md5list.txt) I have tried several things, but I am always confronted to the same problem: some of the filenames have spaces. I have run sed on the... (5 Replies)
Discussion started by: SDelroen
5 Replies

3. UNIX for Dummies Questions & Answers

Making a copy of an Magneto Optical Disk

We are trying to make duplicates of some Magneto Optical Disks that were created in Irix 6.5. The disks are 2.3 gig and the using a scsi MOD drive. Is there possbily a disk copy like in dos or some simple script to do this - any help appreciated. Thanks (0 Replies)
Discussion started by: drew_holm
0 Replies

4. Shell Programming and Scripting

Making script show command (e.g. copy) being executed and variable substitution?

When script is running you only see when some of the commands are not successfull. Is there a way to see which command are executed and to show the substitution of variables as every line is executed ? (3 Replies)
Discussion started by: gr0124
3 Replies

5. Shell Programming and Scripting

Script to check MD5SUM on file

Hi, I currently have a shell script that takes an RPM and scp's it to a set of remote servers and installs it. What I would like to be able to do is make the script get the md5sum of the RPM locally (so get the md5sum of the rpm from where im running the script) and then scp the rpm to the... (0 Replies)
Discussion started by: tb1986
0 Replies

6. Shell Programming and Scripting

PHP Script Help - Making links to files Clickable

Ok so I wrote a php script that outputs the below to users on a webpage. # Download: /home/content/d/i/v/divine1234/eBookDownloads/ScalpRemedy_jablaa12734.zip the php code that outputs the above is: echo ("<li>Download: $download_link</li>\n"); The thing is, I dont want... (1 Reply)
Discussion started by: SkySmart
1 Replies

7. Shell Programming and Scripting

Md5sum script

Hello, I need to download multiple files from an FTP server but occasionally they arrive in error so I need to perform an integrity check. I've been attempting to write a bash script that does the following: Downloads all files including those in sub directories Perform md5sum using... (4 Replies)
Discussion started by: shadyuk
4 Replies

8. Shell Programming and Scripting

Compare files in directories with md5sum

And not to start. I can compare files, that's easy. The problem is that I compare files in a directory, and check if these files exist in another directory. The problem is that the file names are not the same. So I have to compare with "md5sum" or something similar. How I can do? All this in... (7 Replies)
Discussion started by: Jomeaide
7 Replies

9. Shell Programming and Scripting

Need script for making files based on some conditions.

Hi All, I have a text file (code_data.txt) with the followig data. AMAR AB123456 XYZ KIRAN CB789 ABC RAJ CS78890 XYZ KAMESH A33535335 ABC KUMAR MD678894 MAT RITESH SR3535355... (26 Replies)
Discussion started by: ROCK_PLSQL
26 Replies

10. Shell Programming and Scripting

[md5sum] script

I am getting No such file or directory if my variable contains white spaces... Is there a way to fix this? This works x="1.md5" md5sum -c "$x" This, does not x="23\ 5\ 6\ 7\ 8\ 9\ 10.md5" md5sum -c "$x" md5sum: '23\ 5\ 6\ 7\ 8\ 9\ 10.md5': No such file or directory How do I fix... (1 Reply)
Discussion started by: soichiro
1 Replies
FINDDUP(1)							       Perl								FINDDUP(1)

NAME
finddup - Find identical files and do something with them SYNOPSIS
Usage: finddup [options...] --man the manpage -h, --help a short help --version the version (CVS) of the program -n, --noaction do just nothing, just print out (implies -v) -v, --verbose just what the name says -q, --quiet be quiet -l, --link link the identical files together -o, --oldresult Use the old output of this script -i, --ignore-perms Don't check that file owner and permissions match -d, --dir Define the dir to check (you may specify more than one) DESCRIPTION
finddup search the working directory and all files below on the same partition for duplicate files. finddup can optional hardlink such files to save space. Files size 0 will not be reported or hardlinked as this might give problemes later. This is a complete rewrite of the finddup in perl to handle several issues: - Allow spaces and other characters in filenames - be faster - include nodup in same script - Handle files that already have other hardlinks in the same tree - Several improvements If started as nodup or nodup.pl the script will act like started with options --link and --oldresult COPYRIGHT
Copyright (c) 2005 by Klaus Ethgen. All rights reserved. LICENSE
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. AUTHOR
Klaus Ethgen <Klaus@Ethgen.de<gt> HISTORY
$Log: finddup,v $ Revision 2.3 2005/02/06 18:57:42 klaus * Make --oldresult faster by not calculating the md5sum again * Fix a but that with --oldresult no links will be done cause the internal datastructure * Do handle errors in open for md5sum calculation Revision 2.2 2005/02/06 12:21:02 klaus Little but important bug in link routine. Revision 2.1 2005/02/05 18:43:11 klaus Just cosmetic Revision 2.0 2005/02/05 18:41:20 klaus Completely new version Contributed User FINDDUP(1)
All times are GMT -4. The time now is 04:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy