### 27.21 gdb/mi File Transfer Commands

#### The `-target-file-put` Command

##### Synopsis

          -target-file-put hostfile targetfile

Copy file hostfile from the host system (the machine running gdb) to targetfile on the target system.

##### gdb Command

The corresponding gdb command is ‘`remote put`’.

##### Example

         (gdb)
         -target-file-put localfile remotefile
         ^done
         (gdb)

#### The `-target-file-get` Command

##### Synopsis

          -target-file-get targetfile hostfile

Copy file targetfile from the target system to hostfile on the host system.

##### gdb Command

The corresponding gdb command is ‘`remote get`’.

##### Example

         (gdb)
         -target-file-get remotefile localfile
         ^done
         (gdb)

#### The `-target-file-delete` Command

##### Synopsis

          -target-file-delete targetfile

Delete targetfile from the target system.

##### gdb Command

The corresponding gdb command is ‘`remote delete`’.

##### Example

         (gdb)
         -target-file-delete remotefile
         ^done
         (gdb)