Tips Tricks Tutorials

WEB-NES-BAY

Learn Tips and tricks on Linux, Hacking, linux, PHP, Perl, Web, Hardware

bookmark bookmark
WEBNESBAY On August - 12 - 2009

You might be knowing how to compare files using diff command when the files are in remote machine. Now this is the procedure to compare directories.

If you want to compare a remote directory with your directory in local machine, then just follow the below steps.

You need to have the SSH server installed on the remote machine and sshfs in your local machine

openssh

Step 1

Install the open ssh server in remote machine

sudo apt-get install openssh-server

Step 2

On the local machine you need to install sshfs

sudo apt-get install sshfs

Step 3

The next step is to add your user to the fuse group to avoid permissions problems. If you are a registered user in LAN and the server is in your LAN then you can skip this step. Now you can mount the remote directory on the client

sudo mkdir ~/mymount

Step 4

sudo sshfs $username@remote_IP:/remote_directory ~/mymount

you can also mention hostname in place of remote_IP

Step 5

Now you can use diff with the -q switch command

sudo diff -rq local_dir_path ~/mymount

Now you should get a list of the files which differ.

Related posts:

  1. Browse remote directories in python
  2. How to setup a DNS server with bind in Ubuntu linux
  3. Bluetooth personal area network in ubuntu
  4. Linux Keylogger in Ubuntu
  5. Send messages from Ubuntu to Windows over LAN
  6. How to enable Auto Login in Ubuntu Linux
  7. How to surf anonymus in ubuntu linux
  8. Send and Receive Hotmail through Evolution in ubuntu
  9. How to block websites in Ubuntu Linux
  10. Install No Machine NX Server and client
Categories: Linux

Comments are closed.