sort in Window Server 2008

In this article I am going to explain about sort command in Windows Server 2008 operating system and also explain it's related syntax.
  • 1523

sort command in window server 2008

sort command is a command-line tool that is built in Windows Server 2008. this command is available in Windows Server 2000, Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2, Windows Server 2008, Windows Server 2008 R2, Windows Vista. sort command is used to Reads input, sorts data, and writes the results to the screen, to a file, or to another device. Basic syntax for using Cmd command given below.

Syntax

sort [/r] [/+<N>] [/m <Kilobytes>] [/l <Locale>] [/rec <Characters>] [[<Drive1>:][<Path1>]<FileName1>]
 [/t [<Drive2>:][<Path2>]] [/o [<Drive3>:][<Path3>]<FileName3>]

Parameter

Parameter Description
/r It is reverse the sort order that is, sorts from Z to A and from 9 to 0.
/+<N> It is specify for the character position number where sort will begin each comparison. N can be any valid integer.
/m <Kilobytes> It is Specify for the amount of main memory to use for the sort in kilobytes (KB).
/l <Locale> It's override the sort order of characters that are defined by the system default locale.
/rec <Characters> it is specify for the maximum number of characters in a record or a line of the input file. the default value is 4,096 and the maximum is 65,535.
[<Drive1>:][<Path1>]<FileName1> It is specify for the file to be sorted. If no file name is specified, the standard input is sorted. Specifying the input file is faster than redirecting the same file as standard input.
/t [<Drive2>:][<Path2>] it is Specify for the path of the directory to hold the sort command's working storage if the data does not fit in the main memory. By default, the system temporary directory is used.
/o [<Drive3>:][<Path3>]<FileName3> It is specify for the file where the sorted input is to be stored. If not specified, the data is written to the standard output. Specifying the output file is faster than redirecting standard output to the same file.
/? it is used for display Help at the command prompt.

Example

sort-window-server.gif

Ask Your Question 

Got a programming related question? You may want to post your question here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.