Linux short by size
Linux short by size
1 | du -hs * | sort -h
|
Explore linux code snippets and tutorials
Linux short by size
1 | du -hs * | sort -h
|
Bash script to create django project
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #!/bin/bash
if [ $# -eq 0 ]
then
echo "No arguments supplied"
exit 1;
else
mkdir -p $1
cd $1
python3 -m venv env
source env/bin/activate
pip install django django-debug-toolbar django-extensions python-memcached
mkdir public
pip freeze > requirements.txt
django-admin startproject $1
cd $1
mkdir templates static
cd templates
touch index.html base.html
cd ..
pwd
fi
|
Zero fill hard drive in linux
1 2 3 | sudo dd if=/dev/zero of=/dev/sdX bs=1M status=progress
*replace X with the letter of your hard drive
|
Update Ubuntu
1 2 3 4 5 6 | Commands to update Ubuntu:
apt-get update
apt-get -y upgrade
apt-get -y dist-upgrade
apt-get -y autoremove
|
Find info about motherboard
1 | sudo dmidecode
|