Please comment if you have a favorite not on this list.
Favorite Unix Commands
11–20 of 135 posts
Re: Favorite Unix Commands
#12Please comment if you have a favorite not on this list.
alias lsd="ls -ltrF | grep ^d"
Helps me quickly list only directories. Any better alternatives ?Re: Favorite Unix Commands
#13Re: Favorite Unix Commands
#14Re: Favorite Unix Commands
#15Re: Favorite Unix Commands
#16Re: Favorite Unix Commands
#17Re: Favorite Unix Commands
#18faucet 80 --in cat This is useful for creating a connection for receiving the input of what you get... e.g. running faucet 80 --in cat and later curl http://127.0.0.1:80 will deliver to you console : GET / HTTP/1.1 User-Agent: curl/7.21.4 (i686-pc-linux-gnu) libcurl/7.21.4 OpenSSL/0.9.8n zlib/1.2.5 libidn/1.19 Host: 127.0.0.1:900 Accept: /
netcat -l -p 80Re: Favorite Unix Commands
#19Re: Favorite Unix Commands
#20function lc() { if [[ "$#" -gt 1 ]]; then for DIR in "$@"; do echo -n "$DIR - " ; ls -AU1 $DIR | wc -l ; done ; else ls -AU1 "$@" | wc -l ; fi; }
So, "lc /dir" will count the number of files in /dir and "lc /dir/*" will count the files in subdirectories of /dir. This is useful if you're working in an environment where you may have thousands of files in a directory, and a regular "ls -l" will lock your terminal while it eats your entire scrollback buffer.