Tag Archives: ubuntu

SFTP Command to Transfer Files on Remote Servers

SSH File Transfer Protocol, a network protocol used for secure file transfer over secure shell.

SFTP (Secure File Transfer Protocol) runs over SSH protocol on standard port 22 by default to establish a secure connection. SFTP has been integrated into many GUI tools (FileZilla, WinSCP, FireFTP etc.).

Below are the most used commands for SFTP:

1. Connect to SFTP

To connect with SFTP we can use below commands.

[root@salayhin ~]# sftp salayhin@20.42.230.5

Connecting to 20.42.230.5...
tecmint@20.42.230.5's password:
sftp>

If we are using AWS we can add the pem file location with this command.

[root@salayhin ~]# sftp -i PemFile.pem salayhin@20.42.230.5

Continue reading SFTP Command to Transfer Files on Remote Servers

Advertisements

Python locale error: unsupported locale setting

Sometimes we are getting local error and cannot install packages via pip.

I found a solution to get rid of it.

Run this command from your command line interface.

$ export LC_ALL=C

Output from locale is:

$ locale
LANG=co404
LANGUAGE=
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=C

Command line history in ubuntu terminal

Here is few command for getting history in ubuntu terminal.

All history:

 history

 Output:
  483  cat /etc/nginx/nginx.conf 
  487  clear
  488  history
  490  which sh
  496  history 10

This will output like this. First part is the process ID and second part is command.

Get only last 10 history

 history 10

Search for history:

 history | grep nginx

Output: 
483  cat /etc/nginx/nginx.conf 

Running Previous Commands:

 !483
 
 Output:
 483  cat /etc/nginx/nginx.conf 

Hope this will help you to save time.

Happy coding 🙂