Commands
Command | Alias | Comment |
---|---|---|
'string' | String literal, not expanded | |
"string=$a" | String literal with variable expansion | |
"math=$(2+3)" | Embedded calculation | |
"result=$($value)" | Embedded variable | |
1,... |
2020-10-07
Command | Alias | Comment |
---|---|---|
'string' | String literal, not expanded | |
"string=$a" | String literal with variable expansion | |
"math=$(2+3)" | Embedded calculation | |
"result=$($value)" | Embedded variable | |
1,... |
2020-08-11
bcp Database.dbo.TableName out savefile.bcp -S server -T -N -k
Exports data from a certain server and table to a savefile. -T means trusted connection (using Windows authentication), -N uses the database's native storage with Unicode values (specifically designed for server-to-server copy),...
> Keep reading2020-01-26
Enable or disable the firewall:
ufw enable ufw disable
Allow all incoming HTTP traffic and reject telnet globally (normally 'deny' is used but 'reject' will explicitly reject a connection):
ufw allow in http ufw reject telnet comment 'telnet is not encrypted'
Allow...
> Keep reading2019-11-13
Command/option | Description |
---|---|
Containers | Containers are light-weight virtual machines |
docker create image [cmd] |
Create container from image |
docker rename container newname |
Rename container |
docker rm container |
Remove a container |
-f |
Force |
-v |
Also delete volumes |
`docker... |
2019-10-10
Argument | Description |
---|---|
awk '{print $1}' | Print 1st word from lines separated by space |
awk -F: '{print $1}' | Print 1st word from lines separated by colons |
sed -n | Don't display input lines in output |
sed '5d'... |
2019-09-04
Argument | Description |
---|---|
Output | |
-A | Print packet in ASCII |
-e | Print MAC address (link-level info) |
-x | Print packet in hex |
Print parsed output even if saving packets to file | |
-w file | Write raw packets to... |
2019-08-21
Argument | Description |
---|---|
Protocols | |
--http1.0 | Use HTTP 1.0 |
--http1.1 | Use HTTP 1.1 |
--http2 | Use HTTP 2 |
-4 | Resolve domain names to IPv4 |
-6 | Resolve domain names to IPv6 |
-k | Allow insecure connections in SSL |
**HTTP... |
2019-08-15
(Really just a list for myself when I reinstall a new computer.)
2019-07-31
Argument | Description |
---|---|
Requests | |
--header=x | Insert custom header |
--method=x | Use custom HTTP method |
--post-data=STR | Set POST data from string |
--post-file=FILE | Set POST data from file |
--referer=x | Use custom referer |
-t n | Number of retries (0=unlimited) |
Authentication/TLS | |
--http-user=x... |
2018-08-25
Changes file attributes. /s makes it recursive, /d makes it operate on directories as well. I didn't know about these switches before. Handy.
Neither did I know you could call a label in a batch...
> Keep reading