Changes between Version 8 and Version 9 of Internal/OpenFlow/miscUnix
- Timestamp:
- Jun 6, 2012, 7:48:10 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Internal/OpenFlow/miscUnix
v8 v9 3 3 Anything based on a link is reiterated just for completeness, and just in case a link dies. 4 4 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).5 While 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). 6 6 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 7 16 == File recovery with Extundelete == 8 17 Extundelete 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. … … 15 24 }}} 16 25 This 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 == 28 Many 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 ... 32 The following NEW packages will be installed: 33 genisoimage wodim 34 ... 35 After this operation, 2,306 kB of additional disk space will be used. 36 }}} 37 Now, to use: 38 39 1. 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 42 wodim: 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 }}} 48 2. 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 }}} 52 This will spew a bunch of output, but complete with something like below: 53 {{{ 54 Starting new track at sector: 0 55 Track 01: 684 of 684 MB written (fifo 100%) [buf 99%] 16.8x. 56 Track 01: Total bytes read/written: 717533184/717533184 (350358 sectors). 57 Writing time: 327.327s 58 Average write speed 14.6x. 59 Min drive buffer fill was 99% 60 Fixating... 61 Fixating time: 24.715s 62 BURN-Free was never needed. 63 wodim: fifo had 11302 puts and 11302 gets. 64 wodim: fifo was 0 times empty and 11100 times full, min fill was 97%. 65 }}} 66 And eject the CD. 17 67 18 68 == Redirecting the output of a live process. == … … 97 147 }}} 98 148 Set 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 101 151 * ref: http://linuxcourse.rutgers.edu/howto/cups_printing.html 102 152 CUPS 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 … … 124 174 $ lp -o sides=two-sided-long-edge -d Phaser_5500DT [filename] 125 175 }}} 126 127 == one-liners. == 176 ---- 177 == one-liners. == #fortune 128 178 * in bash, if `seq` doesn't exist, try `gseq`. 129 179 * 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.^