Joyfulgrind
Joyfulgrind

Reputation: 2836

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?

Upvotes: 24

Views: 66302

Answers (1)

MarcoBrand
MarcoBrand

Reputation: 781

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

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

Upvotes: 39

Related Questions