FUNDAMENTALS OF COMPUTER

OPERATING SYSTEMS FOR COMPUTERS

COMMAND LINE INTERFACE

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which best describes the error in the following command:get-childitem |format-table | sort-object length
A
The length must be preceded by a-
B
The sort-object length section must come after the get-childitem section.
C
Each | should be a-
D
The cmdlets were not capitalized.
Explanation: 

Detailed explanation-1: -Description. The Get-ChildItem cmdlet gets the items in one or more specified locations. If the item is a container, it gets the items inside the container, known as child items. You can use the Recurse parameter to get items in all child containers and use the Depth parameter to limit the number of levels to recurse.

Detailed explanation-2: -$Error. Contains an array of error objects that represent the most recent errors. The most recent error is the first error object in the array $Error[0] . To prevent an error from being added to the $Error array, use the ErrorAction common parameter with a value of Ignore.

Detailed explanation-3: -Gets only hidden files and directories (folders). By default, Get-ChildItem gets only non-hidden items, but you can use the Force parameter to include hidden items in the results. To get only hidden items, use the Hidden parameter, its “h” or “ah” aliases, or the Hidden value of the Attributes parameter.

There is 1 question to complete.