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?
Copy multiple files locally If you want to copy multiple files at once from one location to another within your system, you can do so by typing rsync followed by source files name and the destination directory.
Rsync allows you to transfer only directory structure if you do not need the files at another location. To do so, add -f"+ */" -f"- *" before the source directory.
Rsync is a useful Linux command-line tool that syncs and copies files and directories. You can use the tool to synchronize data locally between directories and drives, or between two remote machines. The basic rsync commands in Linux sync everything from a location you specify.
Simply insert a slash at the end of the command and it will show the folder contents, thus:
rsync --list-only username@servername:/directoryname/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With