Changes between Version 8 and Version 9 of Internal/OpenFlow/miscUnix


Ignore:
Timestamp:
Jun 6, 2012, 7:48:10 PM (12 years ago)
Author:
akoshibe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/OpenFlow/miscUnix

    v8 v9  
    33Anything based on a link is reiterated just for completeness, and just in case a link dies.
    44
    5 While probably generally applicable to other distros, the contents on this page mostly reference lessons learned whilst using Ubuntu (and stated clearly when that's not the case).   
     5While probably generally applicable to other distros, the contents on this page mostly reference lessons learned whilst using Ubuntu^1^ (and stated clearly when that's not the case).   
    66
     7[#shell Shell-based] Command-line tools. So far, this section includes:
     8 * extundelete - for file system recovery
     9 * cdrecord - for burning ISO's
     10 * process I/O redirection (gdb)
     11 * fixing garbled text (gcc)
     12[#print Printing] quick CUPS setup [[BR]]
     13[#fortune one-liners] miscellaneous single-sentence tips. [[BR]]
     14----
     15= Shell-based tools and techniques = #shell
    716== File recovery with Extundelete ==
    817Extundelete lets you recover files (directories) that you've accidentally deleted on an ext file system. The best way to use the tool is to have a live CD with the tool on it, although it does not seem to come packaged with Linux by default.
     
    1524}}} 
    1625This restores everything that has been deleted in /dev/sda1, given the tool finds them. All recovered files are placed in a recovery directory that you can package and back up before rebooting the machine. 
     26
     27== Command-line CD burner ==
     28Many CD burners are fairly dependency-heavy, mostly thanks to their GUI. `cdrecord` is a command-line based CD/DVD burner with just two dependencies at ~2.3kB:
     29{{{
     30$ sudo apt-get install cdrecord
     31...
     32The following NEW packages will be installed:
     33  genisoimage wodim
     34...
     35After this operation, 2,306 kB of additional disk space will be used.
     36}}}
     37Now, to use:
     38
     391. Check for supported devices. You'll need to specify what to use when burning the image. `cdrecord` seems to just be a wrapper plus then some for `woodim`, and the two can be used interchangeably for this step.
     40{{{
     41$ wodim --devices
     42wodim: Overview of accessible drives (2 found) :
     43-------------------------------------------------------------------------
     44 0  dev='/dev/scd0'     rwrw-- : 'SONY' 'DVD-ROM DDU1615'
     45 1  dev='/dev/scd1'     rwrw-- : 'TSSTcorp' 'CDDVDW SE-208AB'
     46-------------------------------------------------------------------------
     47}}}
     482. Burn. The meaning of the options can be listed with 'cdrecord --help'.
     49{{{
     50$ sudo cdrecord -v -eject speed=16 dev='/dev/scd1' Downloads/ubuntu-12.04-server-amd64.iso
     51}}}
     52This will spew a bunch of output, but complete with something like below:
     53{{{
     54Starting new track at sector: 0
     55Track 01:  684 of  684 MB written (fifo 100%) [buf  99%]  16.8x.
     56Track 01: Total bytes read/written: 717533184/717533184 (350358 sectors).
     57Writing  time:  327.327s
     58Average write speed  14.6x.
     59Min drive buffer fill was 99%
     60Fixating...
     61Fixating time:   24.715s
     62BURN-Free was never needed.
     63wodim: fifo had 11302 puts and 11302 gets.
     64wodim: fifo was 0 times empty and 11100 times full, min fill was 97%.
     65}}}
     66And eject the CD.
    1767
    1868== Redirecting the output of a live process. ==   
     
    97147}}}
    98148Set it the same for both local and remote machines if it's happening over SSH.
    99 
    100 == Printing setup with CUPS. ==
     149----
     150== Printing setup with CUPS. == #print
    101151 * ref: http://linuxcourse.rutgers.edu/howto/cups_printing.html
    102152CUPS stands for Common UNIX Printing System, and is fairly standard as a means to print from UNIX and UNIX-like things. We'll describe the steps needed for quick CUPS printing setup (bare-bones) in Ubuntu 11.04
     
    124174$ lp -o sides=two-sided-long-edge -d Phaser_5500DT [filename]
    125175}}}
    126 
    127 == one-liners. ==
     176----
     177== one-liners. == #fortune
    128178 * in bash, if `seq` doesn't exist, try `gseq`.
    129179 * options for mounting a *BSD filesystem in Linux: `-t ufs -o ufstype=ufs2` (not '44bsd' like the man pages say)
     180----
     181^1. Me being the person that I am will have likely tried these on FreeBSD and maybe lubuntu to see that they work there as well.^