Home HomeUser GuideKryptografia Miroslaw Kutylowski, Willy B. Strothmann(1)Herbert Frank Dzieci DiunyCorel PHOTO PAINT (2)SAMS Teach Yourself PHP4 in 24 HoursConrad Joseph Wsrod pradow (3)DavAccess 2000 Księga eksperta (4)Davidson MaryJanice Królowa Betsy 03 Nieumarła i niedocenionaCook Robin Dewiacja (2)
  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • loko1482.xlx.pl
  •  

    [ Pobierz całość w formacie PDF ]
    .5"oppy has as its natural block size 18k.Failing to set these values could result not only inlonger time to perform the command, but even in timeout errors, so be careful.bs=nn both reads and writes nn bytes at a time.It overrides ibs and obs keywords.cbs=nn sets the conversion bu ers to nn bytes.This bu er is used when translating fromASCII to EBCDIC, or from an unblocked device to a blocked one.For example, les createdunder VMS have often a block size of 512, so you have to set cbs to 1b when reading a foreignVMS tape.Hope that you don't have to mess with these things!skip=nbl and seek=nbl tell the program to skip nbl blocks respectively at the beginning ofinput and at the beginning of output.Of course the latter case makes sense if conversionnotrunc is given, see below.Each block's size is the value of ibs obs.Beware: if you didnot set ibs and write skip=1b you are actually skipping 512 512 bytes, that is 256KB.Itwas not precisely what you wanted, wasn't it?count=nbl means to copy only nbl blocks from input, each of the size given by ibs.Thisoption, together with the previous, turns useful if for example you have a corrupted le andyou want to recover how much it is possible from it.You just skip the unreadable part andget what remains.conv=conversion, conversion.convert the le as speci ed by its argument.Possible conver-sions are ascii, which converts from EBCDIC to ASCII; ebcdic and ibm, which both performan inverse conversion yes, there is not a unique conversion from EBCDIC to ASCII! Therst is the standard one, but the second works better when printing les on a IBM printer ;block, which pads newline-terminated records to the size of cbs, replacing newline with trailingspaces; unblock, which performs the opposite eliminates trailing spaces, and replaces themwith newline ; lcase and ucase, to convert test to lowercase and uppercase; swab, which swapsevery pair of input bytes for example, to use a le containing short integers written on a 680x0machine in an Intel-based machine you need such a conversion ; noerror, to continue processingafter read errors; sync, which pads input block to the size of ibs with trailing NULs.11.3.2 ExamplesThe canonical example is the one you have probably bumped at when you tried to create the rstLinux diskette: how to write to a oppy without a MS-DOS lesystem.The solution is simple:dd if=disk.img of= dev fd0 obs=18k count=80 124 CHAPTER 11.FUNNY COMMANDSI decided not to use ibs because I don't know which is the better block size for a hard disk, butin this case no harm would have been if instead of obs I use bs it could even be a tri e quicker.Notice the explicitation of the number of sectors to write 18KB is the occupation of a sector, socount is set to 80 and the use of the low-level name of the oppy device.Another useful application of dd is related to the network backup.Let's suppose that we are onmachine alpha and that on machine b eta there is the tape unit dev rst0 with a tar le we areinterested in getting.We have the same rights on both machines, but there is no space on b eta todump the tar le.In this case, we could writersh beta ' dd if= dev rst0 ibs=8k obs=20k' | tar xvBf -to do in a single pass the whole operation.In this case, we have used the facilities of rsh to performthe reading from the tape.Input and output sizes are set to the default for these operations, that is8KB for reading from a tape and 20KB for writing to ethernet; from the point of view of the otherside of the tar, there is the same ow of bytes which could be got from the tape, except the factthat it arrives in a rather erratic way, and the option B is necessary.I forgot: I don't think at all that dd is an acronym for data duplicator", but at least this is anice way to remember its meaning.11.4 sort, the data sorter11.4.1 Introduction11.4.2 Options11.4.3 Examples Chapter 12Errors, Mistakes, Bugs, and OtherUnpleasantriesUnix was never designed to keep people from doing stupid things, because that policywould also keep them from doing clever things.Doug Gwyn12.1 Avoiding ErrorsMany users report frustration with the Unix operating system at one time or another, frequentlybecause of their own doing.A feature of the Unix operating system that many users' love whenthey're working well and hate after a late-night session is howvery few commands ask for con rma-tion.When a user is awake and functioning, they rarely think about this, and it is an assest sinceit let's them work smoother.However, there are some disadvantages.rm and mv never ask for con rmation and this frequentlyleads to problems.Thus, let's go through a small list that might help you avoid total disaster:Keep backups! This applies especially to the one user system|all system adminstrators shouldmake regular backups of their system! Once a week is good enough to salvage many les.Seethe The Linux System Adminstrator' s Guide for more information.Individual user's should keep there own backups, if possible.If you use more than one systemregularly, try to keep updated copies of all your les on each of the systems.If you have accessto a oppy drive, you might want to make backups onto oppies of your critical material.Atworst, keep additional copies of your most important material lying around your account in aseperate directory !Think about commands, especially destructive" ones like mv, rm, and cp before you act.Youalso have to be careful with redirection |it'll overwrite your les when you aren't payingattention.Even the most harmless of commands can become sinister:125 126 CHAPTER 12 [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • syriusz777.pev.pl
  •