This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -----------------GIT BASE COMMANDS----------------- | |
/* | |
Установить имя и логин для гита | |
*/ | |
git config --global user.name "Ivanov Ivan" | |
git config --global user.email "ivanov@gmail.com" | |
/* | |
Параметры окончания строк (for Unix-like) | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Небольшая оптимизация работы системы: | |
sudo cat /proc/sys/vm/swappiness - глянуть, какой порог при переходе на свап | |
sudo nano /etc/sysctl.conf - изменить последнюю строчку на | |
vm.swappiness = 5 | |
ребутнуться и посмотреть снова значение из файла swappines. | |
При таком подходе система заюзает свап при превышении ОЗУ 95% своего объема |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep, sed, awk, find чиать: | |
http://stackoverflow.com/questions/7727640/differences-among-grep-awk-and-sed | |
http://stackoverflow.com/questions/1632113/what-is-the-difference-between-sed-and-awk | |
http://unix.stackexchange.com/questions/132313/what-are-the-exact-differences-between-awk-and-cut-with-grep | |
https://davidlyness.com/post/the-functional-and-performance-differences-of-sed-awk-and-other-unix-parsing-utilities | |
http://matt.might.net/articles/sculpting-text/ | |
https://wilsonericn.wordpress.com/2011/08/25/find-grep-sed-and-awk/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Работа с утилитой tar - GNU-архивная утилита; это не совсем архиватор в привычном понимании этого слова | |
// Упаковка файлов в архив (c - create, f - archive-file, v - verbose(выдавать на станд.вывод процесс архивир-я)) | |
// !!! Имя архивируемого файла(-ов) - это параметр ключа -f, поэтому ключ -f должен быть последним | |
// Например ПРОСТО упакуем данные в архив (без сжатия?) | |
tar -cvf myNewArchive.tar path/to/file1 path/to/file2 ... path/to/fileN | |
// также можно указать как целую папку (тоже является файлов$ ВСЁ ЕСТЬ ФАЙЛ в UNIX), так и множестве файлов, напр.: | |
tar -cf myPythonScripts.tar *.py # сделать архив с содержимым всех *.py файлов из текущей директории | |
// Чтобы создать сжатый tar.gz (tgz) архив, нужно создавать архив с опцией -z |