Need to see which daemons are listening for connection requests? Use "sockstat -4l" for IPv4, and "sockstat -l" for IPv4 and IPv6. — Dru <genesis@istar.ca>
Posts Tagged ‘skills’
Filed under: Unix/Linux
Social Tagging: freebsd • skills • sockstat
Filed under: Unix/Linux
Social Tagging: freebsd • skills • tr • ^m
Need to remove all those ^M characters from a DOS file? Try tr -d \r < dosfile > newfile — Originally by Dru <genesis@istar.ca>
Filed under: Unix/Linux
Social Tagging: freebsd • init • rc • skills
FreeBSD is started up by the program ‘init’. The first thing init does when starting multiuser mode (ie, starting the computer up for normal use) is to run the shell script /etc/rc. By reading /etc/rc, you can learn a lot about how the system is put together, which again will make you more confident about [...]
Filed under: Unix/Linux
Social Tagging: freebsd • netstat • route • skills
Need to see your routing table? Type "netstat -rn". The entry with the G flag is your gateway. — Dru <genesis@istar.ca>
Filed under: Unix/Linux
Social Tagging: freebsd • sed • skills • unix命令
Want to use sed(1) to edit a file in place? Well, to replace every ‘e’ with an ‘o’, in a file named ‘foo’, you can do: sed -i.bak s/e/o/g foo And you’ll get a backup of the original in a file named ‘foo.bak’, but if you want no backup: sed -i ” s/e/o/g [...]
Filed under: Unix/Linux
Social Tagging: alias • freebsd • skills • unix命令
You can use aliases to decrease the amount of typing you need to do to get commands you commonly use. Examples of fairly popular aliases include (in Bourne shell style, as in /bin/sh, bash, ksh, and zsh): alias lf="ls -FA" alias ll="ls -lA" alias su="su -m" In csh or tcsh, these would [...]
Filed under: Unix/Linux
Social Tagging: freebsd • skills • term • unix命令
If you are running xterm, the default TERM variable will be ‘xterm’. If you set this environment variable to ‘xterm-color’ instead, a lot of programs will use colors. You can do this by TERM=xterm-color; export TERM in Bourne-derived shells, and setenv TERM xterm-color in csh-derived shells.
Filed under: Unix/Linux
Social Tagging: dig • freebsd • skills • unix命令
To find out the hostname associated with an IP address, use dig -x IP_address — Dru <genesis@istar.ca>
Filed under: Unix/Linux
Social Tagging: cal • freebsd • skills • unix命令
Need to see the calendar for this month? Simply type "cal". To see the whole year, type "cal -y". — Dru <genesis@istar.ca>
Filed under: Unix/Linux
Social Tagging: freebsd • sh • skills • unix命令
To change an environment variable in /bin/sh use: $ VARIABLE="value" $ export VARIABLE
RSS
twitter