Sponsored Content
Top Forums Shell Programming and Scripting Comparing two directories with diff Post 303028582 by Chubler_XL on Thursday 10th of January 2019 04:00:26 PM
Old 01-10-2019
As Stomp mentioned before rsync is a good match for this type of problem.

It offers a --dry-run option that allows reporting on any differences and what would be done to update them. It has many configuration options for example: supports just comparing filenames+date+time or doing a full CRC check of each file, removing files no longer present on the master server, compressing data as it's transferred between the servers, bandwidth capping for reduction on network impact, preserving file ownership and permissions, etc.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

perl package directories - what if the script is diff DIR to the one contain *.pm?

Hi there, say the package is in the ~/ and it's ~/packageFoo.pm I can use usePackage.pl in ~/ (~/usePackage.pl). Now, if I move it to ~/subDIR/usePackage.pl, the script won't work because it's not in the same DIR with packageFoo.pm How can i fix it? Thanks Gusla (1 Reply)
Discussion started by: gusla
1 Replies

2. UNIX for Dummies Questions & Answers

perform diff between 2 directories

Hello all i wander what is the best way to make diff between 2 directories and perform diff of 2 kinds the first is the names of the files on each directory , and the second diff is between the content of each file and the corresponding file and the second dir. Thanks for the help (5 Replies)
Discussion started by: umen
5 Replies

3. UNIX for Dummies Questions & Answers

Compare/Diff between directories and subdirectories?

Hi, Does anybody know the cmd to compare two areas and print out the different files w/ path? I tried cmp and diff and dircmp but with no luck. Should I grep and print? For example: /aa/images/jan ..../images/feb /bb/images/jan ..../images/feb i want to print the compare,... (5 Replies)
Discussion started by: andylee80
5 Replies

4. UNIX for Dummies Questions & Answers

Using diff on files in different directories

Hi, I want to be able to compare two different files in two different directories. I have a development server set up on one domain and a live server set up on another.....I need to be able to compare files on these two servers. Any ideas? (2 Replies)
Discussion started by: elduderino
2 Replies

5. UNIX and Linux Applications

CVS recursive diff -- how to exclude specific directories?

I think I've seen out there that there is a command to ignore specific files within a directory when doing a (-R) recursive diff. I've never used this so I was wondering if there was anyone who could provide an example how I would run this. My thoughts are something like: cvs diff -i <fileName1>... (2 Replies)
Discussion started by: airon23bball
2 Replies

6. Homework & Coursework Questions

comparing 2 directories

i have been asked to write a bash shell script comparing two directories and sed or awk should not be used in this assignment. compdir will compare filenames in two directories, and list information about filenames that are in one directory but not the other. The information listed will be a long... (1 Reply)
Discussion started by: soccerball
1 Replies

7. UNIX for Dummies Questions & Answers

Help regarding effective usage of diff for comparing files

Help regarding effective usage of diff for comparing files Hi All, I have few doubts regarding best usage of diff command. I also have some questions with out put of diff command. File1: ABC DEF File2: ABC DEFAA diff file1 file2 2c2 <DEF ----- (1 Reply)
Discussion started by: sarbjit
1 Replies

8. UNIX for Dummies Questions & Answers

Change chmod on files in diff directories

I am looking for a small script to crawl through several directories and change a couple of files in each directory to read write status. Anyone have any ideas ? (5 Replies)
Discussion started by: zapper222
5 Replies

9. Shell Programming and Scripting

Comparision of two directories of diff servers

Hi All, I have transferred some directory structures from server1 to server2 by creating a tar files. Now i need to cross check whether I transferred entire structures or not. Is there any command to check this on each individual server. Thanks (2 Replies)
Discussion started by: nag_sathi
2 Replies

10. Shell Programming and Scripting

Help with create multiple directories under diff file systems

Hi, Need help ...I want to create multiple directories in different /file systems using for loop..eg.../ORCL_data01/oradata/orcl/ctl. ../ORCL_data01/oradata/orcl/data. ../ORCL_data01/oradata/orcl/redo. Script :- ========= for dir in `ls -d... (8 Replies)
Discussion started by: Linux6.5
8 Replies
timed(8)						      System Manager's Manual							  timed(8)

Name
       timed - time server daemon

Syntax
       /usr/etc/timed [ -i | -n network ][ -E ][ -M ][ -t ]

Description
       The  daemon  synchronizes a host's time with the time of other machines in a local area network running It is normally invoked at boot time
       from the file.

       Servers running slow down the clocks of some machines and speed up the clocks of others to bring them all to the average network time.  The
       average	network  time is computed from measurements of clock differences with the Internet Communication Message Protocol (ICMP) timestamp
       request message.

       The service provided by is based on a master-slave scheme.  When is started on a machine, it asks the master for the network time and  sets
       the host's clock to that time.  After that, it accepts synchronization messages periodically sent by the master and calls the or routine to
       perform any corrections on the host's clock.

       It also communicates with the command to set the date globally, and with the control program, If the machine running  the  master  crashes,
       then  the  slaves  elect  a new master from among slaves running with the flag set.  The flag provides time synchronization on any attached
       networks where no current master server is detected.  Such a server propagates the time computed by the top-level  master.   At	least  one
       daemon on each network must run with the option set to allow it to become a master.

Options
       -E     Overrides  the input of slaves.  Use the flag in conjunction with the flag.  It specifies that a master should not average the times
	      of the slaves to calculate the network time but should distribute the time of its local host as the network time.  This flag  allows
	      a master to distribute time to a network while the network time is controlled by an outside agent such as the Network Time Protocol.

       [-i | -n] network

	      -i     Specifies	a  network  to ignore.	Each network that appears as an argument to the flag is added to the list of networks that
		     will ignore.  If the flag is used, accesses all networks to which the host is connected except for those  networks  specified
		     as arguments to the flag.

	      -n     Specifies a network to use.  When the is started, it gathers information about all the network devices connected to the local
		     host.  If neither the flag nor the flag is used, tries to access all the network devices connected to the	local  host.   The
		     network argument to the flag is the name of a network that should access.

		     If the switch is used, only those networks specified by the flag are accessed.

		     Do not use the and flags together.

       -M     Allows  a  slave	time  server to become a master time server if the master server crashes.  A system running the daemon without the
	      flag set remains a slave.  The daemon checks for a master time server on each network to which it is connected.	It  requests  syn-
	      chronization service from the first master server it locates.

       -t     Enables to trace the messages it receives in the file Tracing can be enabled or disabled with the program.

Restrictions
       Any  system  running with the and options set is eligible to become the master, and distribute its local time to all systems running on its
       network.  Run the Network Time Protocol daemon, instead of to prevent this behavior.

Files
       Invokes the			  daemon each time the system boots

       Tracing file for

       Log file for master

See Also
       date(1), adjtime(2), gettimeofday(2), networks(5), ntpd(8), timedc(8)
       Introduction to Networking and Distributed System Services

																	  timed(8)
All times are GMT -4. The time now is 01:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy