Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

10
  • It's unclear why you want to use -q if you also want a list of differences. That option explicitly turns off the listing of differences. Also, -r is only useful when comparing directories. You appear to compare directory listings (output from ls -R), not directories. Commented May 11, 2024 at 8:33
  • Using rsync -n -ai --delete would give you a list of differences. Is that not what the suggestions propose? (Do not run that without -n!) Commented May 11, 2024 at 8:37
  • 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. Sorry for the lack of clarity. The -R in the ls is probably wrong (it was just me experimenting on how to achieve the above conditions) Commented May 11, 2024 at 8:55
  • (1) I agree with everything @Kusalananda said.  (2) Why you shouldn’t parse the output of ls(1) is relevant.  (3) If you want to compare your entire Documents tree to your entire My_remote_Documents tree (recursively), then the ls -R is appropriate. (But see point 2.)  (4) It can be useful to respond to comments with more comments. But don’t clarify your question in comments; edit it to make it clearer and more complete.  (5) At the risk of repeating point 1, try your command without the -qr. … (Cont’d) Commented May 11, 2024 at 14:54
  • 1
    @Ajned But the files have changed. One is completely new on the target side, three of them have changed permissions and timestamps, and one file's size is different. Commented May 11, 2024 at 19:04