Location: Hints for Navigating in Linux

Discussion: Useful Commands / Scripts / ProgramsReported This is a featured thread

Showing 1 post

mhogan
Useful Commands / Scripts / Programs
Jan 17 2008, 5:16 PM EST | Post edited: Jan 17 2008, 5:16 PM EST
Using the ls -l always seems like too many letters to type just to get a quick listing. Here are two nice scripts to put in /usr/local/bin:
Name: l
Contents: ls -a -l "$@"
Purpose: Allows you to do a listing by just tying "l". The $@ in the command passes the command line to the ls. You can then do something like "l *php" to get a listing of all files that end in php.

Name: lm
Content: ls -a -l "$@" | less -e
Purpose: Takes the output of the ls -l listings and pipes it to less.


Name: ncftp
Purpose: A very nice replacement for ftp. Available from http://www.ncftp.org

Name: Crontab addition
Content: Add the following to your root crontab: 1 * * * * /usr/bin/rdate -s time-a.nist.gov > /dev/null 2> /dev/null
Purpose: This will check and set the server time every hour. To update the root crontab, as root: crontab -e


Name: DenyHosts
Purpose: This script runs as a daemon and monitors your system for people trying to hack in. If it finds a given IP that is trying to guess the ssh password, it will block that IP from the server. Be careful, if you mistype your password too many times, you could be locked out. Get it from: http://denyhosts.sourceforge.net/

Name: /etc/rc.d/rc.local
Purpose: This is where you put any jobs or daemons that you want to start on boot.
Do you find this valuable?    
Keyword tags: None

Sign in to be the first to reply.