Search code examples
rsync

How to use rsync --list-only source to list all the files in that directory?


Rsync can be used to list directories in the server as:

rsync --list-only username@servername:/directoryname

This lists the directory with detail information. Is there any option to rsync to list all the files in the directory instead of listing the directory with detailed information?


Solution

  • Simply insert a slash at the end of the command and it will show the folder contents, thus:

    rsync --list-only username@servername:/directoryname/