Kalanand's March 2008 Log
March 3rd
To see the disk space occupied by subdirectories
du -ks * | sort -nr +0 -1
The command
du -sh
will give you the overall disk usage.
To check quota on afs space
fs lq
To check quota on cmslpc disks
quota -s # Option "s" stands for "summary" and prints out in human readable format
To check the tags of packages checked out in a CMSSW release
showtags -R
March 12th
To pipe the output of a command to a text file
command >&! a.log & # from a terminal window
command; > a.log # inside a ROOT session (DON'T forget the semi-colon and space)
March 17th
To make a tar file of the whole directory
tar -cvf file.tar myDirectory #"myDirectory" is the name of the input directory and "file.tar" is the name of the output tar file
gzip file.tar # will create file.tar.gz
Now I can transfer the above zipped file to my new remote machine where
I am already logged in
scp kalanand@ucbeauty.slac.stanford.edu:file.tar.gz .
Untar and expand the new file:
gunzip file.tar.gz # will create file.tar
tar xvf file.tar # the old directory "myDirectory" will be recreated.
To make a tar file with selected files only
tar -cvf mytarfile.tar -T filelist.txt # "filelist.txt" should contain the list of files to be tarred separated by linebreak
March 20th
Converting a postscript table to GIF format
Sometimes we need to convert a Latex table saved in postscript/pdf
file to GIF/JPG format in order to include in presentations or webpage.
convert -density 144x144 blah.ps blah.gif
Go to February's log
Last modified: Wed Mar 26 12:46:32 CST 2008