dig google.com
ls
ls -la
cd
whoami
cp
cp -R
mkdir -p
Увеличиваем своп, подробности
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
useradd -s /bin/bash -d /home/testuser testuser
passwd testuser
mkdir /home/testuser
chown testuser:testuser /home/testuser
useradd -g primary_grp -G admin -s /bin/shell -p xxxx -d /home/user
https://stackoverflow.com/questions/18006581/how-to-append-contents-of-multiple-files-into-one-file
щас уже все кажется автоматизировали в докере
docker rm `docker ps -a | grep Exited | awk '{print $1 }'`
docker rmi `docker images -aq`
rename s/'^'/'MyPrefix'/ *
tar -czvf bikemol.tar.gz opencart.hahabr.ru
ssh [email protected] 'cd /var/www && tar -cf - anfeya | gzip -9' > anfeya_2014_04_19.tgz
scp [email protected]:landingov.sql ~/landingov.sql
scp -r mydirectory [email protected]:destdir
important params
-a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)
-v, --verbose increase verbosity
-p, --perms preserve permissions
-A, --acls preserve ACLs (implies -p)
-E, --executability preserve executability
--rsync-path=PROGRAM specify the rsync to run on remote machine
--del an alias for --delete-during
--delete-after receiver deletes after transfer, not before
--exclude=PATTERN exclude files matching PATTERN
--exclude-from=FILE read exclude patterns from FILE
--progress show progress during transfer
-z, --compress compress file data during the transfer
-P same as --partial --progress
-n, --dry-run perform a trial run with no changes made
rsync --rsync-path="sudo rsync"
rsync -aE --delete-after --perms --progress
rsync -apPh --del ../lskjs-bot-kit/packages/app/src/ src-bot-kit/
rsync -az * quizly.ru:/var/www/oltri.mgbeta.ru
rsync -chavzP [email protected]:/home/mobi/dump2/faberlic_2015_09_18 ./dump
tail -f /var/log/apache2/error.log
wget "http://shell.skillweb.ru/json/update.php" -O "save/update.html"
wget "http://shell.skillweb.ru/json/" -O "save/index.html"
wget --no-parent --timestamping --convert-links --page-requisites --no-host-directories -erobots=off https://trafficstars.com/
wget --no-parent --timestamping --convert-links --page-requisites --no-host-directories -erobots=off http://landing001.akropol-st.ru/
wget --no-parent --timestamping --convert-links --page-requisites --no-host-directories -erobots=off http://demo.oscodo.com/obsession-v1.1/html-video-bg/dark-demo-two-video-transparent-pattern.html
wget --no-parent --timestamping --convert-links --page-requisites --no-host-directories -erobots=off http://landing001.akropol-st.ru/
wget --no-parent --timestamping --convert-links --page-requisites --no-host-directories -erobots=off --adjust-extension http://landing001.akropol-st.ru/
wget -mpck --no-parent --user-agent="" -e robots=off --wait 1 http://web.archive.org/web/20141216214338/http://biz-accord.ru/
wget --no-parent --timestamping --convert-links --page-requisites --no-host-directories -erobots=off --adjust-extension --mirror --domains=staticweb.archive.org,web.archive.org http://web.archive.org/web/20141216214338/http://biz-accord.ru/
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
CREATE DATABASE "my-db";
CREATE USER "my-user" WITH ENCRYPTED PASSWORD 'mypass';
GRANT ALL PRIVILEGES ON DATABASE "my-db" TO "my-user";
psql -U username dbname < dbexport.pgsql
psql postgres://my-user:my-password@host/my-db < dbexport.pgsql
CREATE DATABASE "buzzguru-billing"; CREATE USER "buzzguru-billing" WITH ENCRYPTED PASSWORD 'tPfo49riJvxasGrYTfhEjA'; GRANT ALL PRIVILEGES ON DATABASE "buzzguru-billing" TO "buzzguru-billing";
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
FLUSH PRIVILEGES;
mysqldump -p -u it-interview it-interview > it-interview_`date +%d_%b_%Y`.sql
mysql -uit-interview -pASdasdasdas it-interview < it-interview_12_02_2014.sql
mongodump --host ds34456436.mongolab.com -d dbname --port 876867 --username user --password pass --collection user --collection order --out ~/db
mongorestore --host localhost --port 21017 -d dbNewName ~/db/dbname