Francais English pages

TRICKS

TRICKS

  • Print a man page
    • >man -t name_of_man_wanted | lpr -P name_of_printer
  • To see the last log
    • >last
  • Cut a file to copy it on a floppy disk
    • >split -b1300k name_of_file
    Reconstruct it
      ....
      >cat xac >> xab
      >cat xab >> xaa
  • Poscript in landscape mode
    • >dvips -t landscape file.dvi -o file.ps
  • Print a poscript file on 2 columns
    • >psnup -2 file.ps | lpr -P name_of_printer
  • Analyse execution time with g++
    • Compile with option -pg
    • Execute the file. (It will create a mong.out file)
    • >gprof file > res.txt
    • Read the file res.txt
  • Get recursively a website
    • >wget -rl http://www.site.org
  • Replace a pattern in a group of files
    • >perl -pi.bak -e 's:old_pattern:new_pattern'*
    • -pi.bak : save old file as *.bak
    • -e : do the instruction on each line of the file
    • 's:old_pattern:new_pattern' : the instruction
    • * : to apply to a group of files
  • To see the content of an archive file
    • >nm file.a
  • To extract the content of an archive file
    • >ar file.a
  • To install a rpm source file (file.src.rpm)
    • >rpm2cpio file.src.rpm | cpio -dimv
  • To check for a multitude of programming errors.
    • >splint program.c

Your browser is not able to accept my CSS2 presentation stylesheet. If you find the non-CSS version of my homepage unbearably ugly, please update your browser. The entire content of this site is accessible even if you stay with your current browser.