[ Pobierz całość w formacie PDF ]
.In order to see what s going on, it also used the -v (verbosemode) option.The mke2fs command will automatically determine the size of your floppy,check it using the badblocks command, found under the /sbin directory, and then createyour Linux filesystem.You might also want to use the -m option with a value of 0 to have themost room available, and specify the high-density floppy device (by default, mke2fs willreserve five percent of the filesystem for the root operator), as follows:# mke2fs -m 0 /dev/fd0H1440 1440As a final step, you can mount the floppy, using the mount command, and then check thefloppy s size, for example:# mount -t ext2 /dev/fd0 /mnt/floppy# df /dev/fd0Filesystem 1024-blocks Used Available Capacity Mounted on/dev/fd0 1390 13 1377 1% /mnt/floppyKnowing how to format floppy drives is important.If you re only interested in DOS floppies,you ll want to explore the mtools package, discussed next.The mtools PackageThemtools package is a set of programs you can use in just about any operation on MS-DOSfloppies.These utilities includemattrib Change file attributesmbadblocks Floppy testing programmcd Change directory commandmcheck Check a floppymcopy Copy files to and from diskmdel Delete files on diskmdeltree Recursively delete files and directoriesmdir List contents of a floppymformat Format a floppyminfo Categorize, print floppy characteristicsmkmanifest Restore Linux filenames from floppymlabel Label a floppymmd Create subdirectorymmount Mount floppy2 1 Handling Files 321mmove mv command for floppy files, directoriesmpartition Make DOS filesystem as partitionmrd Delete directoriesmren Rename a filemtoolstest Test mtools package installationmtype Types a filemzip Zip/Jaz drive utilityxcopy Copy one directory to anotherThis hour doesn t cover all these utilities, but from the list, you should be able to see that themost often used will be the mformat, mdir, mcopy, and mdel commands.The mformatcommand will format nearly any type of floppy device.One nice feature of this package ofsoftware is that you don t have to remember the specific names of floppy devices, such as/dev/fd0, and can use the (possibly) familiar A: or B: drive designators.For example, toformat a floppy in your drive A:, you would use# mformat a:This will automatically format your disk.After the mformat command has finished, you cancopy files to and from the disk with the mcopy command, for example:# mcopy *.txt a:This will copy all files ending in.txt to your disk.To copy files from your disk, just reversethe arguments (in DOS form) to the mcopy command:# mcopy a:*.txtThis will copy all files ending in.txt to the current directory, or a directory you specify.Tosee what is on the disk, use the mdir command, for example:# mdir a:x*.*Volume in drive A has no labelDirectory for A:/xena msg 8708 11-21-1997 12:14p xena.msgxgames msg 2798 11-21-1997 12:14p xgames.msgxrpm msg 3624 11-21-1997 12:14p xrpm.msg3 file(s) 15 130 bytes1 067 008 bytes freeTo label the disk, you can use the mlabel command, for example:2 1# mlabel a:Volume has no labelEnter the new volume label : LINUX 322 Hour 21To delete files on your disk, use the mdel command:# mdel a:*.txtThis will delete all files ending in.txt on the disk in the a: drive.You ve learned the basicoperations, but you can also mount your disk.For details, see the mmount manual page, alongwith the mount command manual page.Now that you know how to manage differentfilesystems, the next section covers how to manage your files.Managing File Ownership andPermissionsManaging files in Linux means more than moving files around the file system or keepingfiles grouped by similar behavior or topic.You can change which user or group owns a fileor directory, and whether or not you, your group, or others can read, write, or execute (run)your files.The chmod (change access permissions) command, found under the /bin directory, is used togive or take away permission of groups or others to your files.Before you can begin to usethe chmod program, you should understand Linux files and how Linux handles file permis-sions.In Hour 4,  Reading and Navigation Commands, you learned how to get a long-format directory listing using the -l option with the ls (list) command.This option showsthe mode and permissions flags of files, for example:# ls -l book/*doc-rw-r--r-- 1 bball bball 78073 Nov 16 19:58 book/24hr06or.doc-rw-r--r-- 1 bball bball 52287 Nov 16 19:57 book/24hr11or.docThe mode and permissions flags for directories and files is listed in the first column, andconsists of a sequence of 10 letters [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • hanula1950.keep.pl