hi!!! i cannot find the proper SYNTAX of the command FORMAT in linux....help!! !
format (command) syntax...
Collapse
X
-
ALL i NEED IS ITS SYNTAX, sample in cp syntax:Originally posted by MotomaWhat type (a.k.a. file format) of partition are you trying to format to?
cp [OPTION]... SOURCE DEST
cp [OPTION]... SOURCE... DIRECTORY
cp [OPTION]... --target-directory=DIREC TORY SOURCE...Comment
-
I don't make it a habit of asking useless questions; the desired format (i.e. ext2, ext3, reiserfs, fat32) changes the tool you use to format (i.e. the command line tool: mke2fs, mke2fs -j, mkreiserfs, mkdosfs) and the command line arguments.Comment
-
I am trying to understand your question.
You are asking for a format command in 'cp'?
If you just want to know how to copy the take a look at this thread
If that is not the case, please be a little more specific as in what you are trying to accomplish (in detail).Comment
-
I think he was just using cp as an example of the response he was looking for from us. He doesn't realize that Linux does not have a flat 'format' command; rather, each partition type has it's own command with it's own (albeit similar) flags.Originally posted by cassbizI am trying to understand your question.
You are asking for a format command in 'cp'?
If you just want to know how to copy the take a look at this thread
If that is not the case, please be a little more specific as in what you are trying to accomplish (in detail).Comment
-
oh yah!! i am just using cp as an example.. thanks for the answers!.. next time, I'll try my best to ask USEFUL QUESTIONS...Originally posted by MotomaI think he was just using cp as an example of the response he was looking for from us. He doesn't realize that Linux does not have a flat 'format' command; rather, each partition type has it's own command with it's own (albeit similar) flags.Comment
-
If you would simply answer my question, (what format you need) I would happily give you the command and it's usage.Originally posted by cessoh yah!! i am just using cp as an example.. thanks for the answers!.. next time, I'll try my best to ask USEFUL QUESTIONS...Comment
-
cess, if you want a Linux equivalent to the DOS/Windows "FORMAT" command for formatting disks, then Motoma and cassbiz are both correct, that you need to know what you are trying to format and how.
If you mean what are the parameters and options to a command (such as mkfs, the linux equiv of FORMAT) then you need to say which command.
An example of formatting a disk in Linux, to the ext3 filesystem format (compare to NTFS) would be:
mkfs -t ext2 /dev/hda1
Wheras to format the same partition to FAT32, you would use:
mkfs -t vfat /dev/hda1
You need to bear in mind that you need to be ROOT to execute those commands, because they can seriously hose your system.
Alternatively, if you need to format a floppy disk, it's easier to use the mformat command, which is an analogue to the dos/win format command, and takes largely the same parameters. This tool is not always installed - you may have to install your distro's mtools package to get this to work.
In all cases, you can use the "man" command to read the online manual docu on all system commands:
man mkfs
man mke2fs
man mformat
If you're not sure what the command is, you can use a keyword search with man, like:
man -k format
The man program is interactive, based on the vi editor. You can search through the text with the '/' command, use the cursor keys and page-up/dn to scroll, and quit the program with 'q'
hth,
-cyberveganComment
-
okkkk!! I got it!!!! thanks!!!!Originally posted by cybervegancess, if you want a Linux equivalent to the DOS/Windows "FORMAT" command for formatting disks, then Motoma and cassbiz are both correct, that you need to know what you are trying to format and how.
If you mean what are the parameters and options to a command (such as mkfs, the linux equiv of FORMAT) then you need to say which command.
An example of formatting a disk in Linux, to the ext3 filesystem format (compare to NTFS) would be:
mkfs -t ext2 /dev/hda1
Wheras to format the same partition to FAT32, you would use:
mkfs -t vfat /dev/hda1
You need to bear in mind that you need to be ROOT to execute those commands, because they can seriously hose your system.
Alternatively, if you need to format a floppy disk, it's easier to use the mformat command, which is an analogue to the dos/win format command, and takes largely the same parameters. This tool is not always installed - you may have to install your distro's mtools package to get this to work.
In all cases, you can use the "man" command to read the online manual docu on all system commands:
man mkfs
man mke2fs
man mformat
If you're not sure what the command is, you can use a keyword search with man, like:
man -k format
The man program is interactive, based on the vi editor. You can search through the text with the '/' command, use the cursor keys and page-up/dn to scroll, and quit the program with 'q'
hth,
-cyberveganComment
Comment