To create a bootable USB memory on linux you have several solutions. The famous dd is the most powerful solution, but use carefully. Because a very small error may destroy all your data.
This is an example to merge 2 last commits.
git rebase -i HEAD~2
2. Change pick to squash the commit you want to merge
3. Save and Exit
git push -f origin master
Print / Check Date from command line
Set date from the command line
date +%Y%m%d -s "20170430"
Set time from the command line
date +%T -s "12:00:00"
The linux shell/bash terminal default behaviour is print output to the terminal (StdOut : Standard output). But sometimes we need to change this behaviour like save toi a file, display noting ... Here some exaple of user case.
Prompt for Yes/No/Cancel input in a Linux shell / bash script
echo "This script will ask a question.";
For that, regenerate locals and setup locale settings.
An also you can use #
localedef -i en_US -f UTF-8 en_US.UTF-8
Show all columns of a table.
SHOW COLUMNS FROM the_table_name;
Example: Show all columns of the mysql user table.
mysql> SHOW COLUMNS FROM mysql.user;
Simple way to create a cifs on debian linux based systems via command line interface (CLI).
1. If not already insttalled, install SAMBA
sudo apt-get update
sudo apt-get install samba
Vi - Vim Ccommand line editor's Usefull commands
vim filename.txt (to create or open a file)
Using chmod, chown chgrp
Change File / Directories permissions.
chmod 0777 . -R #
chmod g+s /var/www #
chmod +x *.sh #
Change File / Folder Owner.
chown www-data:www-data -R .
Change File / Directories Group.