Compare filesystem

Asked by peter

Hello

I've two filesystems. An USB-stick and the harddisc.

How can I compare the content of a directory, which is available ob both filesystems? Thanks for your answer.
Peter

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
peter
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#1

Please open a terminal... then try something like this, type:

cd /path_of_dir1
find . | sort > dir1.txt

cd /path_of_dir2
find . | sort > dir2.txt

diff dir1.txt dir2.txt

Revision history for this message
peter (peter-neuweiler) said :
#2

Hy marcobra

Thanks for your info.

But: the second filesystem is an USB-drive. In the terminal I did the following:

cd Own_Data (harddisc)
find . | sort > Own_Data

Then I would change to the USB-Stick: But the mentioned name in Nautiluas is "2.0 GB Media" and this was not a accepted in the terminal. I entered
cd 2.0 GB Media.

 I got the error "bash: cd: 2.0: No such file or directory".

How can I address rhe USB-Stick?

Thnaks.
Peter

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#3

You need to discover the external usb mount point to do that... try to view the result of mount command... type:

mount

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#4

Better path...

cd /path_of_dir1
find . | sort > /tmp/dir1.txt

cd /path_of_dir2
find . | sort > /tmp/dir2.txt

cd /tmp
diff dir1.txt dir2.txt

Revision history for this message
peter (peter-neuweiler) said :
#5

Mount gives the following output:

root@linux-desktop:~# mount
/dev/sda1 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.24-22-generic/volatile type tmpfs (rw)
securityfs on /sys/kernel/security type securityfs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev)
/dev/sdb on /media/disk type vfat (rw,nosuid,nodev,uhelper=hal,shortname=mixed,uid=0,utf8,umask=077,flush)
root@linux-desktop:~#

Which one is the USB-drive? Thanks.
Peter

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#6

i suppose /media/disk

cd /media/disk/..../path_of_dir1
find . | sort > /tmp/dir1.txt

cd /path_of_dir2
find . | sort > /tmp/dir2.txt

cd /tmp
diff dir1.txt dir2.txt

Revision history for this message
peter (peter-neuweiler) said :
#7

Hy marcobra

Thanks for your answer.
Peter