Skip to main content
Drupal 8

Main navigation

  • Home
    • Question And Answer
    • NEWS
    • Projects
  • Tutorials - Drupal
    • Android
    • Other
User account menu
  • Log in

Breadcrumb

  1. Home

FTP & SCP from Linux terminal

By editor , 25 January, 2018
Question

How to use linux shell to download and upload files via FTP SFTP or SCP ?

 

SCP - Secure copy

Download a file via SCP
File :        /tmp/mysql.dump.sql
Server/Login :    THE_USERNAME:PASSWORD@domain.com
Download to :     . (Current directory)
scp user:pass@domain.com:/tmp/mysql.dump.sql .

 

FTP - File Transfer Protocol

Connet to the server

ftp ftp.domain.com
Show the files in the current directory
ls
Show the current directory path
pwd
Change the directory
cd DIRECTODY_PATH
Change the directory in the local machine
lcd DIRECTODY_PATH
Download a file
get FILE_NAME
Download multimple files (Exampel all .txt files)
mget *.txt
Upload a file
put FILE_NAME
Upload multimple files (Exampel all .txt files)
mput *.txt
Delete a file
delete FILE_NAME
Delete a directory
rmdir
Close the connection from FTP server
quit (or bye)

Tags

  • Server
  • Shell
  • Linux
Linux Shell - Process bulk Images

Comments

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.

Links

  • Drupal.org
  • Drupal core release cycle
  • Drupal events with ease
  • Unit test with Drupal using PHPUnit (Drupal 10)
  • Tokens for file upload url
  • Tips for Docker
  • CKEditor inline image files usage for custom forms.
  • Install Docker on Linux Mint
  • Install PHP 8.1
  • Drupal Security Best Practices
  • Order and sort items with tabledrag
  • Add a custom service YAML container
  • Apply a patch with composer