scpHow to list files using SCP?
SCP (Secure Copy Protocol) is a secure file transfer protocol used to copy files between two computers over a network. It can be used to list files in a remote directory.
Example code
scp -l <username>@<hostname>:<remote_directory>
Output example
file1
file2
file3
Code explanation
scp
: command to initiate the SCP protocol-l
: flag to list files in a remote directory<username>
: username of the remote host<hostname>
: hostname or IP address of the remote host<remote_directory>
: path to the remote directory
Helpful links
More of Scp
- How to transfer files recursively using SCP?
- How to show progress when using SCP?
- How to transfer files using wildcards with SCP?
- Running SCP in quiet mode
- How to SCP to multiple hosts?
- How to run SCP in verbose mode?
- How to automatically create destination directory when using SCP?
- Is it possible to SCP files in parallel?
- How to overwrite files using SCP?
- How to use SCP with a password?
See more codes...