format (command) syntax...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cess
    New Member
    • Feb 2007
    • 19

    format (command) syntax...

    hi!!! i cannot find the proper SYNTAX of the command FORMAT in linux....help!! !
  • Motoma
    Recognized Expert Specialist
    • Jan 2007
    • 3236

    #2
    Originally posted by cess
    hi!!! i cannot find the proper SYNTAX of the command FORMAT in linux....help!! !
    What type (a.k.a. file format) of partition are you trying to format to?

    Comment

    • cess
      New Member
      • Feb 2007
      • 19

      #3
      Originally posted by Motoma
      What type (a.k.a. file format) of partition are you trying to format to?
      ALL i NEED IS ITS SYNTAX, sample in cp syntax:
      cp [OPTION]... SOURCE DEST
      cp [OPTION]... SOURCE... DIRECTORY
      cp [OPTION]... --target-directory=DIREC TORY SOURCE...

      Comment

      • Motoma
        Recognized Expert Specialist
        • Jan 2007
        • 3236

        #4
        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

        • cassbiz
          New Member
          • Oct 2006
          • 202

          #5
          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

          • Motoma
            Recognized Expert Specialist
            • Jan 2007
            • 3236

            #6
            Originally posted by cassbiz
            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).
            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.

            Comment

            • cess
              New Member
              • Feb 2007
              • 19

              #7
              Originally posted by Motoma
              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.
              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...

              Comment

              • Motoma
                Recognized Expert Specialist
                • Jan 2007
                • 3236

                #8
                Originally posted by cess
                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...
                If you would simply answer my question, (what format you need) I would happily give you the command and it's usage.

                Comment

                • cybervegan
                  New Member
                  • Jan 2007
                  • 36

                  #9
                  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,
                  -cybervegan

                  Comment

                  • cess
                    New Member
                    • Feb 2007
                    • 19

                    #10
                    Originally posted by cybervegan
                    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,
                    -cybervegan
                    okkkk!! I got it!!!! thanks!!!!

                    Comment

                    Working...