473,855 Members | 2,150 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

format (command) syntax...

19 New Member
hi!!! i cannot find the proper SYNTAX of the command FORMAT in linux....help!! !
Feb 14 '07 #1
9 10005
Motoma
3,237 Recognized Expert Specialist
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 New Member
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...
Feb 14 '07 #3
Motoma
3,237 Recognized Expert Specialist
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 New Member
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 Recognized Expert Specialist
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 New Member
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 Recognized Expert Specialist
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
cybervegan
36 New Member
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 New Member
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
5140
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 However if I update any other column the syntax is fine
2
7855
by: addi | last post by:
What getdate() syntax command can give me time in the following format: 10:41:55 AM Regards, Addi
6
6166
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 my mappings between named colors, HEX values and the Long Integer values used in Access are not jibbing. Anyone have a nice list laying around? Danny J Lesandrini dlesandrini@hotmail.com
6
2841
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 as specified in the format string. For example fmt("this is $1 format string. arg2 is $2", "short", 3) would return the string "this is short format string. arg2 is 3" Now, the above is easy to write and I have done so. What I want is...
5
10713
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 experience a problem in the interpretation of the format. I populate the parameter value from a user input text box. I am in the UK so the use inputs in the format dd/mm/yy. I know SQL user the US format of mm/dd/yy.
8
3706
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 & "\MameGames.cfg", AppWinStyle.NormalFocus, True) The problem is that the parameter Application.StartupPath has spaces (C:\Program Files, for instance) and won't execute from a command prompt without being incased in quotes. I can't figure out the...
4
4170
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? Here are 2 examples of the query: SELECT table1.*,table2.field1,table2.field2,table2.field3 FROM table1,table2 WHERE table1.field1 = table2.field1 AND table1.field2='103' AND table2.TStamp > '12/19/2005 12:20:14 PM' ORDER BY table2.TStamp
5
4839
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 principle I'd use if it was an sql database but I'm getting an error telling me the syntax of the "insert into" command
19
2367
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 separator in filenames on both Unix and Dos. But where is this documented? -- Neil Cerutti
0
9903
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11047
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10692
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10769
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10375
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9526
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7084
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
4168
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3194
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.