Commit 8454ad2
Changed files (5)
unix
commands
unix/commands/bash.md
@@ -7,7 +7,7 @@ category: "unix"
---
-## Summary
+## Summary - `bash`
| OS | Default Available | Online Man |
|---------|-------------------|-------------------------------------------------------------------------------------------------------------------|
@@ -22,12 +22,12 @@ category: "unix"
| Usage info | `bash --help` |
| Man | `man bash` |
-## Usage
+## Usage - `bash`
Bash is a command interpreter and scripting language which enables user and scripted interactions with systems.
It is highy reccomended to skim the entire bash man page.
-## Examples
+### Examples
| command | description |
|---------------------|--------------------------|
| `bash -c <COMMAND>` | run the provided command |
@@ -50,7 +50,7 @@ Use `set | less` to list current bash shell variables.
| HISTSIZE | The number of commands to remember in the command history. |
-## Reference Materials
+## Reference Materials - `bash`
* [Bash Builtins](http://www.tldp.org/LDP/abs/html/internal.html)
unix/commands/netstat.md
@@ -0,0 +1,48 @@
+---
+date: "2017-01-17"
+draft: false
+title: "netstat"
+tag: ["cli", "commands"]
+category: "unix"
+
+
+---
+
+## Summary - `netstat`
+
+| OS | Default Available | Online Man |
+|---------|-------------------|-------------------------------------------------------------------------------------------------------------------|
+| Linux | Y/N | [netstat](http://man7.org/linux/man-pages/man1/netstat1.html) |
+| Solaris | Y/N | [netstat](https://docs.oracle.com/cd/E23823_01/html/816-5166/netstat-1m.html#scrolltoc) |
+| BSD | Y/N | [netstat](https://www.freebsd.org/cgi/man.cgi?query=netstat) |
+| MacOS | Y/N | [netstat](https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/netstat.1.html) |
+
+| Basics | Command |
+|--------|---------|
+| Version | `netstat --version` |
+| Usage info | `netstat -h` |
+| Man | `man netstat` |
+
+## Usage - `netstat`
+
+Print network connections, routing tables, and more!
+
+### Examples
+| netstat | OS | description |
+|---------|----|---------|
+| `netstat -antup` | Linux | all, numerical, tcp, udp, process ID |
+| `netstat -anP tcp` | Solaris | all, numerical, tcp |
+| `netstat -anP udp` | Solaris | all, numerical, udp |
+
+## Reference Materials - `netstat`
+
+ * [go](go)
+ * [read](read)
+ * [these](these)
+ * [amazing](amazing)
+ * [links](links)
+
+### See Also
+ * [pfiles](({{< relref "unix/commands/pfiles.md" >}}) - solaris version of lsof (can be used to lists open sockets)
+ * [lsof](({{< relref "unix/commands/lsof.md" >}}) - can be used to lists open sockets
+
unix/commands/template.md
@@ -8,7 +8,7 @@ category: "unix"
---
-## Summary
+## Summary - `command`
| OS | Default Available | Online Man |
|---------|-------------------|-------------------------------------------------------------------------------------------------------------------|
@@ -23,17 +23,17 @@ category: "unix"
| Usage info | `command -h` |
| Man | `man command` |
-## Usage
+## Usage - `command`
Summary of usage to include a table of flags if appropriate
-## Examples
+### Examples
| command | description |
|---------|-------------|
| `command -a 10 --progress file` | command takes flags, agruments, and positional parameters |
| <code>command | grep ftw</code> | find all winners |
-## Reference Materials
+## Reference Materials - `command`
* [go](go)
* [read](read)
unix/meta/man.md
@@ -0,0 +1,16 @@
+---
+date: "2017-01-17"
+draft: false
+title: "man"
+tag: ["cli", "commands"]
+category: "unix"
+
+
+---
+
+## Online Sources
+
+### Solaris Man Pages
+
+ * [User Commands](https://docs.oracle.com/cd/E26502_01/html/E29030/toc.html)
+ * [System Admin Commands](https://docs.oracle.com/cd/E23823_01/html/816-5166/toc.html)
unix/meta/survey.md
@@ -0,0 +1,56 @@
+CentOS
+
+date
+
+### Situational Awarness
+ifconfig -a
+cat /etc/resolv.conf
+cat /etc/sysconfig/network
+cat /etc/sysconfig/network-scripts/ifcfg-*
+w
+last
+ps -ef
+
+## Network Triage
+hostname
+netstat -antup
+lsof -p [pids of listening processes]
+netstat -nr
+arp -a
+iptables -vL -t filter
+iptables -vL -t nat
+iptables -vL -t mangle
+iptables -vL -t raw
+iptables -vL -t security
+
+ip neighbor show
+ip route show
+ip address show
+ip link show
+
+### Security Status
+sestatus
+getenforce
+
+### System Profiling
+vmstat
+free
+uptime
+hostid
+uname -a
+cat /proc/cpuinfo (psrinfo -v #solaris)
+lsmod (modinfo -c #solaris)
+
+### Startup / Running
+history
+cat /etc/inittab
+chkconfig --list
+sort <(services --status-all) <(chkconfig --list | grep :3)
+ls -lart /etc/rc.d/rc3.d/
+ls -al /etc/cron*
+
+### Disk Triage
+# show the contents of all directories which have 'bin' in them
+find / -maxdepth 3 -name *bin -type d 2>/dev/null | xargs ls -l
+cat /etc/passwd
+