-
Notifications
You must be signed in to change notification settings - Fork 0
Linux Commands
falceso edited this page Mar 19, 2018
·
5 revisions
How to get directory size.
du -sh directory
List Files:
ll -ah
Change Directory
cd dir
Change back to home
cd
Current Directory
pwd
https://learncodethehardway.org/unix/bash_cheat_sheet.pdf
Helpful Search for String
grep -rnw 'Dir' -e 'String'
Simple Rsync
rsync -r --progress {directory|file} {directory2|file2}
MySQL
CREATE USER '{newuser}'@'{host, recommended to be %}' IDENTIFIED BY '{password}';
create databases {newdb}
GRANT ALL PRIVILEGES ON {db}.* TO '{user}'@'{host ,recommended to be %}';
GRANT ALL PRIVILEGES ON mydb.* TO '{user}'@'{host ,recommended to be %}' WITH GRANT OPTION;
- Used to grant permission to create/delete/edit/update databases/users.
LetsEncrypt
letsencrypt certonly -d {domain} {domain2}``` Domain2 not required but is an example to add more domains to a cert.
Pterodactyl Disable 2FA (v0.6.4)
$u = \Pterodactyl\Models\User::where('username', 'yourusernamehere')->first();
$u->use_totp = false;
$u->save();
Calendar
cal
History
history
List Block Devices
lsblk
or lsblk -l
List Open Files
lsof