List of FTP Commands For Linux and Windows with Examples

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/list-of-ftp-commands-for-linux-and-windows-with-examples/
PINTEREST
PINTEREST
INSTAGRAM

FTP protocol and tools are used to transfer data over network in a simple manner. There are different FTP tools with GUI support which can provide simple usage without knowing any command but in some cases we may need to use FTP commands. In this tutorial we will learn how to use FTP commands with example in operating systems like Windows and Linux.

Escape Shell

Execute Macro

Defined macros can be executed with the $ by providing the macro name. In this example we will run macro named test

Print Local Help Information

We can print help information about local commands with ?

Print Local Help Information
Print Local Help Information

Send Account Command To Remote Server

After connecting an FTP server we can change the current user with account command. This will as for the USER and PASS information.

Append To A File

We can append into existing file with append command like below.

Set ASCII Transfer Type

There are different transfer types. We can use ascii to change text transfer mode.

Beep When Command Completed

beep command will play sound after the given command is completed.

Set Binary Transfer Type

Other than ascii type there is also binary transfer type where there will be no translation during transfer.

Terminate FTP Session and Exit

We can terminate current FTP session and exit from FTP shell with bye command like below.

Terminate FTP Session and Exit
Terminate FTP Session and Exit

Toggle Case Sensitivity

Case sensitivity can be enabled or disabled with case command like below.

Change Remote Working Directory

We can change current working directory of the remote system or server with the cd command. In this example we will navigate to the remote directory Mirror

Change Remote Working Directory
Change Remote Working Directory

Change Remote Directory To Parent Directory

cdup will automatically change current working directory of remote system to the parent or single upper level.

Change Remote File Permissions

If we have enough privileges we can change remote system file permissions iwth chmod like in Linux systems.

Terminate FTP Session

Another command to terminate FTP sessions but this command will not exit from interactive FTP shell.

Terminate FTP Session
Terminate FTP Session

Enable/Disable Carriage Return Stripping

Enable/Disable Debugging

If we have problem about executing commands we may need more information. We can run commands in verbose mode with debug command.

LEARN MORE  Bash For and While Loop Examples

Enable/Disable Debugging
Enable/Disable Debugging

Delete Remote File

We can delete remote file with delete command. In this exmaple we will delete file named old.txt

List Contents of Remote Directory

We can list contents , files and folders of the remote system with the dir command like below.

List Contents of Remote Directory
List Contents of Remote Directory

Terminate FTP Session

We can close current FTP session or connection but stay in the FTP shell with disconnect command.

Terminate FTP Session
Terminate FTP Session

Terminate FTP Session and Exit

We can terminate current FTP session and exit from FTP shell with exit command.

Terminate FTP Session and Exit
Terminate FTP Session and Exit

Set File Transfer Format

Receive File

We can download from remote system with get command. We will download file named timestamp.txt in this example.

Receive File
Receive File

Display Local Help Information

Display Local Help Information
Display Local Help Information

Set Binary Transfer Type

Allow Use Of Any IP Address Family

Resctrict Only IPv4

Restrict Only IPv6

Change Local Working Directory

As we work also local system we can change local directory with lcd command.

Change Local Working Directory
Change Local Working Directory

List Contents Of Remote Directory

The one of the most popular FTP command is ls which will list contents, files, folders of the remote system.

List Contents Of Remote Directory
List Contents Of Remote Directory

Define Macro

Delete Multiple Files

We can delete multiple files and folders with a single command. In this example we will delete files named 1.txt , 2.txt , 3.txt

Create Directory On Remote

We can create a directory on the remote system with mkdir command. In this example we will create directory named backup

List Contents Of Multiple Remote Directories

Set File Transfer Mode

Show Last Modification Time Of Remote File

We can show last modification time of the file on the remote system with modtime command. We will list modification time of the  filelist.gz on the remote system.

Show Last Modification Time Of Remote File
Show Last Modification Time Of Remote File

Send Multiple Files

We can put multiple files with mput command. In this example we will send files 1.txt , 2.txt , 3.txt

Get File If Remote File Is Newer Than Local File

We can only get file if remote file is newer then local file. In this example we check remote file 1.txt with local file 1.txt

List Contents Of Remote Directory

Set Template For default File Name Mapping

Set Translation Table For Default File Name Mapping

Connect Remote FTP Server and Port

We can connect to the FTP server with open command from FTP shell. In this example we will connect to the ftp.itu.edu.tr .

LEARN MORE  How To Remove or Delete A Directory In Linux?

Connect Remote FTP Server and Port
Connect Remote FTP Server and Port

Enter Passive Transfer Mode

Force Interactive Prompting on Multiple Commands

Issue Command On Alternate Connection

Send Single File

We can use put command in order to send single file to the FTP server. In this example we will send file named data.txt to the remote system.

Print Working Directory on Remote System

We can print and list current working directory of the remote system or server. We will use pwd without any option.

Print Working Directory on Remote System
Print Working Directory on Remote System

Print ? In Place Of Control Characters

Terminate FTP Session and Exit

Another good command in order to terminate FTP session and exit from FTP shell.

Terminate FTP Session and Exit
Terminate FTP Session and Exit

Send Arbitrary FTP Command

Receive File

Another good command in order to download file from remote FTP server we will use recv command with the file name we want to download. In this example we will download file named timestamp.txt .

Receive File
Receive File

Get File Restarting At End Of Local File

Rename File

We can rename a remote file. We will use rename with the current name of file and new name of the file. We will rename file named data.txt into newdata.txt

Clear Queued Command Replies

Restart File Transfer At Byte Count

Get Help From Remote Server

Remove Directory On Remote System

We can remote a directory on the remote FTP server or system with rmdir by providing the directory name. In this example we will remove directory named old

Show Status Of Remote System

After connecting remote FTP server or system we can print current status about the remote system and connection with the rstatus command.

LEARN MORE  What is Microsoft Powershell ? How Can I Automate Tasks?

Show Status Of Remote System
Show Status Of Remote System

We can see that there are following information

  • Connected IP address
  • Mode or Type which is ASCII in this case
  • Sessions bandwith limit which is unlimited in this example
  • Sessions timeout which is 300 seconds in this example
  • Control connection type which is plain text in this example
  • Data connection type which is plain text in this example
  • Connected client count to the remote FTP server which is 2 in this example
  • Server software name and version with its banner which is vsFTPd 2.2.2 in this example

Toggle Store Unique for Local File

Send One file

We can send a single file to the remote server with the send command by specifying file name. In this example we will send file named data.txt

Enable/Disable Use Of PORT For Each Data Connection

Show Size Of Remote File

We can print the size of the given file on the remote server with size command and providing the file name. In this example we will print the size of the filelist.gz

Show Size Of Remote File
Show Size Of Remote File

Show Current Status

We can print current status of the connection and technical details with status command.

Show Current Status
Show Current Status

Set File Transfer Structure

Toggle Store Unique On Remote System

Show Remote System Type

While working with remote FTP server operating system is important. We can get information about remote system with system command like below.

Show Remote System Type
Show Remote System Type

Set Tenex File Transfer Type

Enable/Disable Printing Byte Counter During Transfers

Enable/Disable Package Tracing

Set File Transfer Type

Get Umask On Remote System

Send New User Information

We can relogin with different user name by using user command. We will provide user name and password interactively.

Send New User Information
Send New User Information

Enable/Disable Verbose Mode

Like debug mode with can enable and disable verbose mode with verbose command like below.

Enable/Disable Verbose Mode
Enable/Disable Verbose Mode

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/list-of-ftp-commands-for-linux-and-windows-with-examples/
PINTEREST
PINTEREST
INSTAGRAM