MAC sudo route -n add -net network/subnet default_gateway WINDOWS ping 127.0.0.1 pathping 192.168.0.2 tracert 192.168.0.2 route print route -p add 192.168.0.2 mask 255.255.255.255 192.168.0.1 route -p delete 192.168.0.2 netsh interface ipv4 set address "Local Area Connection" source=DHCP netsh interface ip set address "Local Area Connection" static 192.168.0.100 255.255.255.0 {192.168.0.1|none} netsh interface set interface "Local Area Connection" {ENABLED|DISABLED} telnet 192.168.0.2 80 nmap 192.168.0.2 telnet 192.168.0.2 > get http://192.168.0.2/default.html http/1.0 ipconfig - Windows IP configuration fc - FC is an advanced DOS Command that compares two files and displays the differences between them. type - open text files sans Notepad. Similar to Unix cat command. tree - visual directory structure tree > mydirectory.txt print mydirectory.txt attrib - make hidden files visible assoc - which program will open that .xyz file move - more flexible than copy-paste move *2006.xls c:\2006Reports\ find - advanced file search with filter To search your hard disk to find and display the file names on drive C: that contain the string "Google" use the pipe (|) to direct the results of a dir command to find as follows: dir c:\ /s /b | find "Google" /? ; To view help at the command-line, at the command prompt, type the following: CommandName /? Type - Show the file data Tasklist - See process list Taskkill - Kill process LINUX bash clear date cp ; copy mv rm ; remove file rm -rf mkdir sudo ps ; show processes cat man find ./ -name find ./ -name "File_name" -type d 2>/dev/null ; Output without "No such file or directory" lines grep *.txt ; Look in actual folder for the string on all *.txt files tail -f ; last input commands on a dynamic file Ex: tail -f /tmp/log.log | grep 192.168.0.2 find . | xargs grep '' ; Solaris tcpdump -i eth0 -nnvvXSs 0 host 192.168.0.2 port 80 -w /tmp/capture.cap ifconfig -a ; Check ethernet interfaces ethtool -S eth0 ; Check packets in Eth interface netstat -rn ; Check Routing Table netstat -an ; Check listening ports free ; Check free system memory cat /proc/meminfo ; Additional info about system memory top ; Monitor system processes & CPU utilization df -k ; Check disk partitions and free space tar fzx ; Unzip a tar.gz file cd :/ ; Navigate to desired folder path ftp user:password@192.168.0.2 binary ls ; List folder on remote FTP server get file.txt put file.txt snmpwalk -v -c snmpset -v -c Ex: snmpset -v 2c -c public 192.168.0.2 0.1.52.36 integer 2 snmptable -v -c /bin -> All the core Linux programs /etc -> Confifguration info for the system /etc/init.d -> Start-up info about which services to run /home -> Personal files & settings of each user /home/ -> User data and files for the user /mnt -> Mounted discks (CD-ROM/USB) /root -> Files & settigns of root user /sbin -> Built-in programs for root /usr -> Third party SW & extra files /usr/bin -> Third-party programs not part of basic OS (ex.: Firefox) /usr/include -> Programming code for people compiling own software /usr/share -> Shared apps data (ex.: icons, wallpapers) /usr/src -> Uncompiled source programs for Linux files /var/run -> PID programs that stop from running multiple times /var -> Log data & process info /proc -> cacti -> Performance graphics free -> Memory use and state gnome system monitor -> System performance iostat -> Data i/o from cpu and hdd iptraf -> Monitor i/o traffic (ports, interfaces) jffnms -> Graphic monitoring of multiple devices mpstat -> See multi-core processor performance nagios -> Monitoring system netstat -> Shows open connections pmap -> Performance of the memory (overall and by process) ps -> Shows running processes and memory/processor sar -> Reports of the equipment activity ss -> Socket statistics strace -> Debug of web, apache, httpd, lighthttp servers tcpdump -> Traffic through a port in real time top -> Real state of the device uptime -> Similar to top w/ uptime and process load vmstat -> State of the device, hw and processes w -> Users connected and what they are doing IOS Ctrl + A ; Beggining of line Ctrl + E ; Go to end of line Ctrl + W ; Delete word at left Ctrl + R ; Refresh Esc + F ; Move word fordward Esc + B ; Move word back no line console timestamp disable ; show timestamp in console * ; wildcard | begin | exclude | include | utility egrep ; Search file using regular expressions fgrep ; Search file for fixed character string uniq ; Display or remove repeated lines in file less ; File page by page EXCEL Ctrl + Shift + 1 Numbers w/ 2 decimal points Ctrl + Shift + 2 Hour time Ctrl + Shift + 3 Date time Ctrl + Shift + 4 Currency Ctrl + Shift + 5 Percentage Ctrl + Shift + 6 Power Exp Ctrl + Space ; Select Column Shift + Space ; Select Row Ctrl + + ; Add Column/Row/Cell Ctrl + - ; Delete Column/Row/Cell Ctrl + ~ ; Show/Hide Formulas Ctrl + 0 ; Hide Column Ctrl + 9 ; Hide Row WORD Crossed References Select Text -> Insert Bookmark -> Name Bookmark -> Add Go w/ cursor to desired place to insert bookmark Cross-reference -> Reference Type: Bookmark / Insert reference to: Bookmark Text -> Insert --- SQL CREATE TABLE CREATE TABLE table_name (row1 VARCHAR(128), row2 INTEGER, ...) INSERT DATA INSERT INTO table_name (row1, row2, ...) VALUES ('data1', 'data2', ...) DELETE DATA DELETE FROM table_name WHERE row1='data1' UPDATE DATA UPDATE table_name SET row1='data1' WHERE row2='data2' RETRIEVE DATA SELECT * FROM table_name WHERE row1='data1' SELECT * FROM table_name WHERE row1='data1' ORDER BY row1