Category: Commands

backup
Commands
Alex

Ubuntu server backup script

Backup script backup.sh #!/bin/bash #################################### # # Backup to NFS mount script. # #################################### # What to backup. backup_files=”/home /var/spool/mail /etc /root /boot /opt” # Where to backup to. dest=”/mnt/backup” # Create archive filename. day=$(date +%A) hostname=$(hostname -s) archive_file=”$hostname-$day.tgz” # Print start status message. echo “Backing up $backup_files to $dest/$archive_file” date echo # Backup the

Read More »
terminal
Commands
Alex

My Terminal Command list

Install zsh and ohmyzsh sudo apt update sudo apt upgrade sudo apt install zsh sudo apt install git sh -c “$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)” or sh -c “$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)” Install web browsers sudo apt install chromium-browser sudo apt install google-chrome-stable to zip folder zip -r my.zip directory to unzip the zip file unzip my.zip

Read More »
time
Commands
Alex

Linux command to change file’s timestamp

There are many times when I finished editing the videos or photos and when I do the export, the file’s timestamp is the export date and time, but the event was a few days ago or even a few months ago, I use the following command to change the timestamp on my files so when

Read More »
command line
Commands
Alex

Linux server create new user and ssh login without password

Install SSH server $ sudo apt update $ sudo apt install openssh-server Check Status $ sudo systemctl status ssh Client machine side Generate ssh key pair This will generate your ssh key pair [php]ssh-keygen[/php] This is your public key, this key value need to be exist in the server you connect to. [php]more ~/.ssh/id_ras.pub[/php] Server

Read More »
docker
Commands
Alex

Docker – get start guide

Docker – get start guide I’ve discover the love for python language, I’ve tried django route but I think is too complicated for beginning of programming python, then I’ve discover flask, is much simpleper to develop small apps quickly, I’ve try to develop simple app locally, connect to database and render out data to a

Read More »
Scroll to Top