Skip to content

Instantly share code, notes, and snippets.

@qwersk
Created November 21, 2018 07:53
Show Gist options
  • Save qwersk/2863c6e6c11d1fd796fed1676ff11370 to your computer and use it in GitHub Desktop.
Save qwersk/2863c6e6c11d1fd796fed1676ff11370 to your computer and use it in GitHub Desktop.
Linux commands #linux
Find out folder size:
`du -sh file_path`
du (disc usage) command estimates file_path space usage
-s, --summarize
display only a total for each argument
-h, --human-readable
print sizes in human readable format (e.g., 1K 234M 2G)
@qwersk
Copy link
Author

qwersk commented Nov 21, 2018

Узнать свободное/занятое место в файловых системах:
df -h
-h, --human-readable
Отобразит размер в человеко-читаемом формате, добавив названия единиц (Kилобайт, Mегабайт, Гигабайт, Tерабайт)
В текущей папке:
df -h ./
Вики

@qwersk
Copy link
Author

qwersk commented Nov 22, 2018

Вывести список процессов:
ps aux
a = show processes for all users
u = display the process's user/owner
x = also show processes not attached to a terminal

Вывести необходимый процесс:
ps aux | grep xvfb

@qwersk
Copy link
Author

qwersk commented Nov 23, 2018

Архивировать папку:
tar -cvzf archive_name.tar.gz dirpath

-c create
-v вывод списка упакованных файлов в процессе работы
-z архиватор gzip
-f filename

@qwersk
Copy link
Author

qwersk commented Dec 13, 2018

GET запрос с помощью curl

curl -G --data-urlencode "messtype=email" --data-urlencode "reciplist=EMAIL_TO" --data-urlencode "messbody=test test test" http://ADDRESS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment