Tip #823 Remove DS_Store files from shared folders
.DS_Store files are a hidden file created by OS X to store custom attributes of a folder such as the position of icons or the choice of a background image. By default, they are created in every folder accessed, even folders on remote systems (for example, folders shared over an SMB or AFP connection). This can soon leave your shared folders littered with these files.The command below will remove all DS_Store files from the current directory and any sub directories.
Read more »
Tip #822 Hierarchic list of processes
You probably use the ps command a lot, but sometimes there is too much info, and somewhat disordered. It can be easily ordered with the forest option, as the following example shows: Read more »- TAGS:
- ps
Tip #821 Command line currency conversion
The script below can be used to convert between different currencies on the command line. In order to use the script, you would enter something like "[scriptname] 150 USD GBP" to give the value of 150 US dollars in British pounds.Supported currencies are Euro, U.S. dollar British pound, Japanese yen, Swiss franc, Canadian dollar, Australian dollar, and Indian rupee.
Read more »
Tip #820 Following a log file
Here are a couple of ways to follow additions to a log file.Read more »
- TAGS:
- less
Tip #819 List 10 biggest files in a directory
The commmands below show the ten largest files/dirs in the working directory. Both commands give similar results, though handle things slightly differently. The 'du' option is good if you also need sizes of subdirectories, but the 'ls' option gives more detail.Read more »
Tip #818 Print first line of every paragraph
The awk command below will print out the first line of each paragraph in a file. Paragraphs must be separated by a blank line for this to work.Read more »
- TAGS:
- awk
Tip #817 Limit top by user
'top' is a usful command which provides a dynamic real-time view of a running system and something most people use regularly. However, a lot of people don't know that the output can be limited on a per user basis. 'top -u username' will just give output for the given user.The following can be useful for shell scripts etc to perform 'top' for the current user:
Read more »
- TAGS:
- top
Tip #816 Graph connections to hosts
The command below will print a ascii art graph of connections from you are making to different hostsRead more »
Tip #815 Matching files and packages in Debian/Ubuntu
To find out what files a package generated during installation.Read more »
- TAGS:
- dpkg
Tip #814 Quit bash without saving history
If you're working in bash and want to quit without saving your history, you can do so using:Read more »
- TAGS:
- bash
alias aptitude at awk bash bc cal cat cd colrm comm cp csh curl cut date dd df dialog diff dirname dpkg du fc find fuser grep gs gzip history iconv kill ksh last less ln ls lsof lynx m4 md5sum mkdir mkfifo mkisofs mv mysql nc netstat openssl OSX perl ping popd ps pushd python read redirection rm scp screen sed sort ssh stat sudo svn tail tar tee test top tr uniq vim wc wget xargs