The Archives

  • 17.Mar.12
    Text manipulation on UNIX cmd | pfortuny | (0)
    A quick link to IBM's introduction to text utilities on UNIX. They know the stuff.
  • 13.Jul.09
    OR in grep cmd | rafacas | (0)
    $ egrep "regexp1|regexp2" file1 file2 Search one or more files (file1 and file2 in our example) for lines that match any of several (two in our case) regular expressions: regexp1 OR regexp2. The '|' stands for the OR.
  • 18.Feb.09
    Alias shell | fernape | (0)
    This command, when invoked without arguments, shows the list of aliases in your shell session: $>alias alias dir='ls -l' alias l='ls -alF' alias md='mkdir -p' It also allows you to create your own aliases: $>alias lc='ls --color' If for some reason, you want to delete an alias, you can use the unalias command: $>unalias lc Aliases can help you saving a lot of time by avoiding repetitive and long commands and options. If you want them to be permanent, you should add those definitions to your .bashrc file.
  • 04.Feb.09
    Batch convert RTF to PDF automated, scripts, shell | pfortuny | (0)
    You've got the full details here (the OpenOffice Forum site). After following the instructions there, I was able to convert a bunch of some 500 rtf files into pdf's with the following single 'line of code' (although there must be a newline after the first quote ') $ find /Users/pedrofortunyayuso/Desktop/fichitas -name "*rtf" | while read -r i ; do /Applications/ -invisible "macro:///Standard.MyConversions.SaveASPDF($i)" ; done All the above shows my computer as an evident OS X, but this works on Windows (the referred site does the job on Windows, using, obviously a different shell construct) and, as far as I know, on ...
  • 29.Jan.09
    sdf, public Unix shell access shell | pfortuny | (5)
    I have mentioned it several times before, but I have been told it deserves an entry on its own. The Super Dimension Fortress (known also as freeshell) is a public Unix system: that is a Unix system (actually Netbsd running on an Alpha-64) to which everyone (each person in the world having a network connection) can log in and which anyone can use. From its main page: Our mission is to provide remotely accessible computing facilities for the advancement of public education, cultural enrichment, scientific research and recreation. Members can interact electronically with each other regardless of their location using passive or interactive forums. Further purposes include ...
  • 07.Jan.09
    Viewing compressed files cmd | rafacas | (0)
    $ zmore Allows examination of the compressed file zmore filters for paging through text one screenful at a time, as the more command. It works on files compressed with compress, pack, gzip or zip.
  • 03.Jan.09
    Script: all your keystrokes are belong to us cmd, shell | pfortuny | (0)
    $ script -a filename All the input and output (on stdout) is typescript to filename, probably for later inspection or for printing (with lpr, for which the file is prepared). Might be useful for forensic purposes (to know what you broke after an incident and what you did not break).
  • 01.Jan.09
    Showing this year’s calendar cmd | rafacas | (0)
    $ cal 2009 2009 Jan Feb Mar S M Tu W Th F S S ...
  • 28.Dec.08
    Last system boot date cmd | rafacas | (0)
    $ who -b reboot ~ 16 nov 22:02 Shows the system's boot date and time.
  • 20.Dec.08
    Whereis? cmd | fernape | (0)
    The whereis command shows information about paths for binary, sources and man pages for a given program: $ whereis ls ls: /bin/ls /usr/share/man/man1/ls.1.gz /usr/src/bin/ls On BSD systems it shows the location at the ports hierarchy from which you can install the program.