***************************************************************** setenv CVSROOT :kserver:cmscvs.cern.ch:/cvs_server/repositories/uscms cvs co ROC ***************************************************************** setenv CVS_RSH ssh setenv CVSROOT :ext:alstone@cmscvs.cern.ch:/cvs_server/repositories/CMSSW cvs co cmsnotes/shift Use your lxplus password when prompted. ***************************************************************** latex cms_MTCC_main.tex dvips -o cms_MTCC_main.ps cms_MTCC_main epstopdf cms_MTCC_main.ps ***************************************************************** Date: Mon, 28 Aug 2006 14:52:41 -0500 From: Hans Wenzel Subject: kill all user jobs on node ---------------------------------------- condor_q condor_q -help condor_rm -name cmswn064.fnal.gov user cmsroc ***************************************************************** Date: Mon, 21 Aug 2006 09:01:04 -0500 From: Patrick Gartung Subject: web root directory The web root directory is /var/www/html ***************************************************************** Date: Fri, 18 Aug 2006 09:31:58 -0500 From: Hans Wenzel Subject: access to cvs setenv CVSROOT lpccvs@cdcvs.fnal.gov:/cvs/lpc cvs co MTCC http://cdcvs.fnal.gov/cgi-bin/public-cvs/cvsweb-public.cgi/MTCC/?cvsroot=lpc Other useful commands: cvs add 'filename/directory' cvs delete 'filename/directory' cvs commit 'filename/directory' cvs --help ***************************************************************** Date: Wed, 08 Feb 2006 16:25:07 -0600 From: Patrick Gartung To: Alan L. Stone Subject: Restarting web server (ELog) kinit; ssh root@nippon.fnal.gov /etc/rc.d/init.d/elogd restart ***************************************************************** Date: Fri, 13 Aug 2004 20:28:00 -0500 (CDT) From: buehler cat input.txt | awk '{if ($12>10) print $0}' > output.txt It goes through input.txt line by line, checks if the number of events, $12 (12th column), is larger than 10 (for example), and if so prints out the entire line ($0) into output.txt. ****************************************************************** Date: Fri, 28 Nov 2003 06:40:48 +0100 (CET) From: Laurent Duflot If you want to know how many lines there are in a file, you can do wc -l myfile ****************************************************************** Date: Fri, 28 Nov 2003 14:33:27 -0600 From: Paul S. Russo Common text file manipulation patterns To append file 2 to file1 giving file3: $ cat file1 file2 > file3 To pipe all lines from file1 to the wc (word count) command: $ cat file1 | wc To get the first N lines of file1: $ head -N file1 or equivalently: $ head -n N file1 To get the rest of file1, skipping the first N lines: $ tail +N file1 To get the last N lines of file1: $ tail -N file1 To get only the lines from file1 that match a pattern: $ egrep 'pattern' file1 To get lines from file1 which *do not* match a pattern: $ egrep -v 'pattern' file1 To translate tabs to an equivalent number of spaces in file1: $ cat file1 | col -x To make it possible to search the output of the man command: $ man topic | col -bx | less To select columns 1, 5, 9, 10, and 11 from the output of the ls -l command: $ ls | tr -s ' ' | cut -d ' ' -f 1,5,9,10,11 where tr -s ' ' squeezes multiple spaces to just one, and cut -d ' ' -f 1,5,9,10,11 divides each line into columns delimited by the ' ' character and selects fields (columns) 1, 5, 9, 10, and 11 (attributes, size, name [including symlink]). To see the contents of your PATH environment variable more clearly: $ echo $PATH | tr ':' '\n' To sort file1: $ sort -o file1 file1 To sort the output of ls -l by size (column 5): $ ls -l | sort -b -n -k 5,5 If you know both file1 and file2 are almost the same but still different (like two directory listings that are supposed to contain the same files but don't quite): To find which lines are in file1 but not in file2: $ comm -23 file1 file2 To find which lines are in file2 but not in file1: $ comm -13 file1 file2 To find which lines are in both file1 and file2: $ comm -12 file1 file2 If the output of these commands is not making sense try: $ sort -u -o file1 file1 $ sort -u -o file2 file2 then use the comm command. ****************************************************************** Date: Thu, 27 Nov 2003 21:21:31 -0600 From: Stilianos Kesisoglou The following command takes the lines from X=10 to Y=17 (included lines X and Y) from the file "inFile" and places them on the file "outFile". cat inFile | awk 'BEGIN{X=10;Y=17} {if (NR>=X && NR<=Y) print $0}' > outFile ****************************************************************** Date: Thu, 11 Sep 2003 12:43:22 -0500 From: Peter Tamburello "I have text file containing an integer number in each line. Is there an easy way to get the sum of those numbers?" awk '{sum+=$1; print sum}' file.txt | tail -1