triogroup.blogg.se

List directory contents linux shell
List directory contents linux shell













list directory contents linux shell list directory contents linux shell

If we use below command, it displays the files which are having the file extension “.exe”. Also observe that, we used wildcard (*) to display multiple items PS C:\WINDOWS> Get-Item. That means, below command display files which are in the C:\WINDOWS directory. Observe that, PS prompt shows that the directory is C:\WINDOWS. For example: if the item is the Directory, if we use wildcard (*) with Get-Item it will display files which are in the Directory.īelow command will display files which are in the current directly. PS C:\WINDOWS> Get-Item ".", "regedit.exe"Īs mentioned above, Get-Item can display the content of the Item if you use the wildcard (*). Observe that, the folder ( Dot (.) – means, current directory) and the file name are separated by comma (,). For example: below command displays the details of the folder & the file at a time. If you want to get the details of multiple file(s) or the folder(s) we can give the names in double quotes (“) – which is optional and separated by comma (,). Observe that, Get-Item by default displays only one entry not all the files in the folder. For example: if you want to see the details of the folder “C:\WINDOWS”, we can use this cmdlet, like below PS C:\> Get-Item "C:\WINDOWS" We can use Get-Item cmdlet, to get the details of the file or the folder. When you specify wildcard (*) it gets the child items at the specified location. By defaultm it gets only one item, unless you specify wildcard (*). Get-Item is one of the cmdlet used to get the item (for example: directory, file, registry entry etc.,) details at the specified location. Below are the cmdlets, commonly we use to get these details Display files and folders list PowerShell provides commands, to display the list of files & folders in the file system.















List directory contents linux shell