TitBits
Unix utility commands
# tar and compress to stdout and then ssh and untar it to the new machine
$ tar czf - <files> | ssh user@host "cd /wherever && tar xvzf -"
Alternatively, use -C option with ssh and drop 'z' option with tar
can use rsync or sshfs as well
More info:
https://unix.stackexchange.com/questions/10026/how-can-i-best-copy-large-numbers-of-small-files-over-scp
# To find the UUID of the embedded device like UDOO x86
sudo dmidecode | grep UUID
# Regular expressions
https://www.gnu.org/software/sed/manual/html_node/Regular-Expressions.html
To substitute numbers followed by 1 or more spaces with comma and a space
a = [[2 345 657]
[34 567 7890]]
%s/[0-9] \+/&,/g
then
%s/, \+/, /g
# to find the IP address in ubuntu
hostname -I
# to find the IP address in MAC
ifconfig | grep -w inet | grep -v "127.0.0.1" | awk '{print $2}'System Admin commands
To give a particular user sudo privilege to run a particular command
Common apt-get commands
To fix broken apt-get
To find the hard drives in udoo x86, creating filesystem and mounting
To activate /etc/rc.local in ubuntu 18.04
To check if an image is JPEG
Bytes to string:
CRON
Python - glob files from dir and extract file_prefix
Python - utility commands
Python - multiprocessing
Git utilities
How to block comment in bash script
BASH SCRIPTING
AWS CLI
AWS Check the 'pending validation' state in Certificate Manager
AWS MOUNT S3 to EC2
AWS mount a volume to a running instance
BOTO
Uploading to GDrive
GDrive commands
nvidia-smi commands:
CURL COMMANDS:
MongoDB commands:
S3
Upload Images to S3 from client - secure way without exposing credentials
GCloud Commands
Jenkins on kubernetes
TLS 1.2 (same as SSL v4.0)
SSL/TLS - create own certificate - letsencrypt
Remote Desktop Solutions - Ubuntu
Install Fonts in ubuntu machine
SSH TUNNELING
Screen
Setting up Uwsgi, Flask and Nginx
Sendmail/mail/mailx/ssmtp
How to bind v4l2 cameras to USB ports
How to start VNC on GCP machine
XML in Python
To extend disk space on GCP/AWS drive
When ubuntu GUI hangs
OpenVPN
Setting up FTP server
Command to find Internet-facing IP address:
Last updated