Connect to an FTP server:

lftp -u username,password ftp://ftp.example.com
  • -u username,password: Specifies the username and password to use when connecting to the FTP server.
  • ftp://ftp.example.com: The URL of the FTP server to connect to.

Download a file:

get remote_file.txt
  • get: The command to download a file.
  • remote_file.txt: The name of the file on the FTP server to download.

Upload a file:

put local_file.txt
  • put: The command to upload a file.
  • local_file.txt: The name of the file on your local machine to upload.

Change directory:

cd remote_directory
  • cd: The command to change the current directory.
  • remote_directory: The name of the directory on the FTP server to change to.

List files:

ls
  • ls: The command to list the files in the current directory.

Mirror a directory:

mirror -R local_directory remote_directory
  • mirror: The command to mirror a directory.
  • -R: Specifies that the mirroring should be done in reverse (i.e., from local to remote).
  • local_directory: The name of the directory on your local machine to mirror.
  • remote_directory: The name of the directory on the FTP server to mirror to.