diff -qr command between local and remote directories
0
votes
0
answers
213
views
According to this process substitution can be used to do a SIMPLE diff between local and remote machine. However, I want to use the
-qr
option in the diff command, i.e., it must be recursive and brief (reports only files that differ). If I try to do
`
diff -qr <(ls -R ~/Documents) <(ssh myusername@192.168.1.150 ls -R /pathinmyremote/My_remote_Documents)
`
I get Files /dev/fd/63 and /dev/fd/62 differ
which is obviously not what I am looking for. There are suggestions of using rsync with the dry-run option, but that does not include the brief option.
The reason for -qr
is that I want to know 1) which files are in my local machine and missing in my remote backup, and 2) which files that have been changed/updated in my local machine with respect to the ones in the backup remote.
**Update**
The suggestion to use rsync -n -ai --delete ~/Documents myusername@192.168.1.150:/pathinmyremote/My_remote_Documents
results in:
which is also not right (due to the existing files/directories)
Asked by Ajned
(111 rep)
May 11, 2024, 07:03 AM
Last activity: May 11, 2024, 05:15 PM
Last activity: May 11, 2024, 05:15 PM