Sponsored Content
Top Forums Shell Programming and Scripting Comparing files names in directory over two servers Post 302555857 by Chubler_XL on Thursday 15th of September 2011 11:05:49 PM
Old 09-16-2011
rsync is the tool for this sort of thing, the --dry-run option should report what would happen if you went ahead, it runs over ssh and is quite configurable.


This might be a good starting point:

Code:
rsync -avx --del --dry-run /path/to/local/tree  remote:/path/to/remove/tree > logfile


Last edited by Chubler_XL; 09-16-2011 at 12:12 AM..
This User Gave Thanks to Chubler_XL For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how can i copy a list of files with different names into others directory have the same name

dear all. how can i copy a list of files with different names into others directory have the same name like i have 3 files 10_10 10_10_11 10_10_11_12 and i have 3 directories 10_10 10_10_11 10_10_11_12 how can i make a loop to cp this files into the directory have the same name like... (0 Replies)
Discussion started by: t17
0 Replies

2. UNIX for Dummies Questions & Answers

How can i copy a list of files with different names into others directory have the same name?

dear all. how can i copy a list of files with different names into others directory have the same name like i have 3 files 10_10 10_10_11 10_10_11_12 and i have 3 directories 10_10 10_10_11 10_10_11_12 how can i make a loop to cp this files into the directory have the same name like... (31 Replies)
Discussion started by: t17
31 Replies

3. Shell Programming and Scripting

How to store files names from a directory to an array

Hi I want to store the file names into an array. I have written like this but I am getting error. declare -A arr_Filenames ls -l *.log | set -A arr_Filenames $(awk '{print $9}') index=0 while (( $index < ${#arr_Filenames })); do Current_Filename=${arr_Filenames} ... (5 Replies)
Discussion started by: dgmm
5 Replies

4. Shell Programming and Scripting

Grepping file names, comparing them to a directory of files, and moving them into a new directory

got it figured out :) (1 Reply)
Discussion started by: sHockz
1 Replies

5. Shell Programming and Scripting

How to find all files which has names in uppercase in a directory

i want to display all the files which has their names in the Uppercase in a particular directory...guide.. (6 Replies)
Discussion started by: sheelsadan
6 Replies

6. Shell Programming and Scripting

Comparing files in a directory against an array of files

I hope I can explain this correctly. I am using Bash-4.2 for my shell. I have a group of file names held in an array. I want to compare the names in this array against the names of files currently present in a directory. If the file does not exist in the directory, that is not a problem.... (5 Replies)
Discussion started by: BudMan
5 Replies

7. Shell Programming and Scripting

Comparing file ownership/permission and content of files located on two different servers

Hi All, can some one suggest me a tool to compare file ownership/permission and contents of files located at two different unix servers? Thanks, Pranav (1 Reply)
Discussion started by: Pranav Bhasker
1 Replies

8. Shell Programming and Scripting

Edit names of files in a directory

Hi all, I have a directory with multiple (thousnads) of files, which are named this way ABCDEF.wo.im-1 OKRAME.ire.roi IOJEAFO01.irt.gfg IMNYBL05.REG.gkf I would like to keep the part of the name (everything before the first dot in the filename). The desired output: ABCDEF... (3 Replies)
Discussion started by: Error404
3 Replies

9. Shell Programming and Scripting

Finding files in directory with similar names

So, I have a directory tree that has many files named thusly: X_REVY.PDF I need to find any files that have the same X portion (which can be nearly anything) as any another file (in any directory) but have different Y portions (which can be any number from 1-99). I then need it to return... (3 Replies)
Discussion started by: Kamezero
3 Replies

10. Shell Programming and Scripting

Directory containing files,Print names of the files in the directory that are exactly same content.

Given a directory containing say a few thousand files, please output a list of all the names of the files in the directory that are exactly the same, i.e. have the same contents. func(a_directory_name) output -> {“matches”: , ... ]} e.g. func(“/home/my/files”) where the directory... (7 Replies)
Discussion started by: anuragpgtgerman
7 Replies
DH_UCF(1)							     Debhelper								 DH_UCF(1)

NAME
dh_ucf - register configuration files with ucf SYNOPSIS
dh_ucf [debhelperoptions] [-A] [-n] [file...] DESCRIPTION
dh_ucf is a debhelper program that is responsible for generating the postinst and postrm commands that register files with ucf(1) and ucfr(1). FILES
debian/package.ucf List pairs of source and destination files to register with ucf. Each pair should be put on its own line, with the source and destination separated by whitespace. Both source and destination must be absolute paths. The source should be a file that is provided by your package, typically in /usr/share/, while the destination is typically a file in /etc/. A dependency on ucf will be generated in ${misc:Depends}. OPTIONS
-A, --all Install all files specified by command line parameters in ALL packages acted on. -n, --no-scripts Do not modify postinst/postrm scripts. Turns this command into a no-op. file ... Install these info files into the first package acted on. (Or in all packages if -A is specified). NOTES
Note that this command is not idempotent. dh_prep(1) should be called between invocations of this command. Otherwise, it may cause multiple instances of the same text to be added to maintainer scripts. SEE ALSO
debhelper(7) This program is a part of debhelper. AUTHOR
Joey Hess <joeyh@debian.org> Jeroen Schot <schot@a-eskwadraat.nl> 11.1.6ubuntu2 2018-05-10 DH_UCF(1)
All times are GMT -4. The time now is 12:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy