473,394 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

format (command) syntax...

19
hi!!! i cannot find the proper SYNTAX of the command FORMAT in linux....help!!!
Feb 14 '07 #1
9 9994
Motoma
3,237 Expert 2GB
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?
Feb 14 '07 #2
cess
19
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=DIRECTORY SOURCE...
Feb 14 '07 #3
Motoma
3,237 Expert 2GB
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.
Feb 14 '07 #4
cassbiz
202 100+
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).
Feb 14 '07 #5
Motoma
3,237 Expert 2GB
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.
Feb 14 '07 #6
cess
19
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...
Feb 15 '07 #7
Motoma
3,237 Expert 2GB
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.
Feb 15 '07 #8
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
Feb 15 '07 #9
cess
19
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!!!!
Feb 16 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: S.Patten | last post by:
Hi, I have a problem with updating a datetime column, When I try to change the Column from VB I get "Incorrect syntax near '942'" returned from '942' is the unique key column value ...
2
by: addi | last post by:
What getdate() syntax command can give me time in the following format: 10:41:55 AM Regards, Addi
6
by: Danny Lesandrini | last post by:
I'm using an Access database to drive a web site and the colors of various table backgrounds are stored in Access. I want users of the Access database to be able to select colors for the site, but...
6
by: Stuart McGraw | last post by:
I am looking for a VBA "format" or "template" function, that is, a function that takes a format string and a varying number of arguments, and substitutes the argument values into the format string...
5
by: Tim Marsden | last post by:
Hello, I am building a parameterised query in vb.net for execution against a SQL server database. I am using a OLEDB command and OLEDB parameters. If one of the parameters is a date I sometimes...
8
by: jcrouse | last post by:
I am trying to run a command from a command prompt using the shell command. Here is the syntax I want to execute: Shell(lblMameExePath.Text & " -listinfo >" & Application.StartupPath &...
4
by: Johnny Ruin | last post by:
What do you think of a query that generates a System.Data.SqlClient.SqlException when submitted via a application, but when run through QueryAnalyzer or EnterpriseManager doesn't generate a error?...
5
by: mabond | last post by:
Hi VB.NET 2005 Express edition Microsoft Access 2000 (SP-3) Having trouble writing an "insert into" command for a Microsoft table I'm accessing through oledb. I've tried to follow the same...
19
by: Neil Cerutti | last post by:
Where can I find documentation of what Python accepts as the filename argument to the builtin function file? As an example, I'm aware (through osmosis?) that I can use '/' as a directory...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.