Sunday, January 30, 2022

BASH Operators

Non-exhaustive bash's command operators/separators:

| pipes (pipelines) the standard output (stdout) of one command into the standard input of another one. Note that stderr still goes into its default destination, whatever that happen to be.

|&pipes both stdout and stderr of one command into the standard input of another one. Very useful, available in bash version 4 and above.

&& executes the right-hand command of && only if the previous one succeeded.

|| executes the right-hand command of || only it the previous one failed.

; executes the right-hand command of ; always regardless whether the previous command succeeded or failed. Unless set -e was previously invoked, which causes bash to fail on an error.

Official link: https://www.gnu.org/software/bash/manual/bash.html#Lists

Saturday, January 15, 2022

Transfer files between Ubuntu-20 and Windows-11 locally via wi-fi/lan network

 On Ubuntu machine:

Step 1: Install ssh

sudo apt install ssh

Step 2: Start ssh

sudo systemctl enable --now ssh

Step 3: Allow port 22 communication

sudo ufw allow 22/tcp

Step 4: Install filezilla software from official website.

https://filezilla-project.org/


On Windows machine:

Step 1: Install filezilla software from official website.

https://filezilla-project.org/


To transfer files get the IP address of required node and fill details as said below: 

Open filezilla 

Navigation:

File --> Site manager --> New site


Under General tab:

Protocol: SFTP - SSH File Transfer Protocol

Host: IP address of the machine to transfer (if from Windows to Ubuntu then enter IP of Ubuntu and vice versa)

User: username

Password: password


***