Get System Files Using Get-ChildItem in PowerShell

Chirag Nagrekar
Updated on 23-Jan-2020 07:54:19

2K+ Views

System files are operating system files and are not visible by default using Get-ChildItem. To get the system files you need to use –System parameter.ExampleFor example, below command will provide you system files and folders under C:\Windows\System32.PS C:\WINDOWS\system32> Get-ChildItem -SystemOutputDirectory: C:\WINDOWS\system32 Mode                LastWriteTime         Length Name ----                -------------         ------ ---- d---s-       25-12-2019     01:14                AppV d---s-       19-03-2019     10:22           ... Read More

Get ReadOnly Files Using Get-ChildItem in PowerShell

Chirag Nagrekar
Updated on 23-Jan-2020 07:53:04

1K+ Views

To get the Readonly files with Get-ChildItem in PowerShell, you need to use the –Readonly files. Readonly file has attribute ‘r’.In the below example, you can check the attribute of the file.Get-ChildItem D:\Temp\ -ReadOnlyOutputPS C:\WINDOWS\system32> Get-ChildItem D:\Temp\* -ReadOnly     Directory: D:\Temp Mode                LastWriteTime         Length Name ----                -------------         ------ ---- -ar---       13-01-2020     18:19              0 Readonlyfile.txtYou can check the read-only attribute value in Mode property.

Exclude Specific File Names Using Get-ChildItem in PowerShell

Chirag Nagrekar
Updated on 23-Jan-2020 07:52:30

4K+ Views

To exclude specific file(s) from being displayed in the output of Get- ChildItem, you need to specify the file name(s).CommandGet-ChildItem D:\Temp\ -Recurse -Exclude style.css, LGPO.exeOutputDirectory: D:\Temp\LGPO Mode                LastWriteTime         Length Name ----                -------------         ------ ---- -a----       01-06-2017     02:25         638115 LGPO.pdf     Directory: D:\Temp Mode                LastWriteTime         Length Name ----                -------------     ... Read More

Exclude Specific Extension in Get-ChildItem in PowerShell

Chirag Nagrekar
Updated on 23-Jan-2020 07:49:27

4K+ Views

To exclude specific extensions, you need to use –Exclude parameter in Get-ChildItem.ExampleFor example, as shown below when we run command, it will exclude .html files and display the rest.Get-ChildItem D:\Temp\ -Recurse -Exclude *.htmlOutputDirectory: D:\Temp Mode                LastWriteTime         Length Name ----                -------------         ------ ---- d-----       24-11-2018     11:31                LGPO     Directory: D:\Temp\LGPO Mode                LastWriteTime         Length Name ---- ... Read More

Search for Files Using Wildcard Character in PowerShell

Chirag Nagrekar
Updated on 23-Jan-2020 07:48:25

4K+ Views

You can also search for files with a specific name or using the wildcard (*) character.CommandBelow command will search for the files (including hidden files) starting with “Bac”.Get-ChildItem D:\Temp -Recurse -Force -Include Bac*OutputPS C:\WINDOWS\system32> Get-ChildItem D:\Temp -Recurse -Force -Include Bac*     Directory: D:\Temp\GPO_backup\{C9C3DB4C-2E51-4201-B3C3-7C0F1ACECBE9} Mode                LastWriteTime         Length Name ----                -------------         ------ ---- -a----       24-11-2018     11:34           6215 Backup.xmlCommandWhen you use the wildcard character (*) at both the ends, file ... Read More

Install Git on Linux

Samual Sam
Updated on 23-Jan-2020 07:47:55

13K+ Views

Git is a popular open source version control system like CVS or SVN. This article is for those, who are not familiar with Git. Here, we are providing you with basic steps of installing Git from source, Creating a new project, and Commit changes to the Git repository.Difference between Git and other Version Control SystemsMost of the other version control systems, store the data as a list of files and changes are made to each file over time. Instead, Git thinks of its data more like a set of snapshots in a file system. Every time, it takes a snapshot ... Read More

Configure and Set Up a Firewall on Ubuntu 16.04

Sharon Christine
Updated on 23-Jan-2020 07:47:45

2K+ Views

In this article we will learn about – how to configure and setup UFW ( Firewall) on Ubuntu 16.04, UFW stands for Uncomplicated Firewall which acts as an interface to IPTABLES that simplifies the process of the configuration of firewalls it will be a very hard for a beginners to learns and configure the firewall rules where we will secure the network from unknown users are machines. UFW works on the policies we configure as rules.Pre-requisitesFor this, we needed a non-root user with root permission on the machine.Installing the UFW (Firewall)UFW is installed by default with Ubuntu, if not installed ... Read More

Use Wildcard Character in Get-ChildItem in PowerShell

Chirag Nagrekar
Updated on 23-Jan-2020 07:47:45

3K+ Views

You can also search for files with a specific name or using the wildcard (*) character.CommandBelow command will search for the files (including hidden files) starting with “Bac”.Get-ChildItem D:\Temp -Recurse -Force -Include Bac*OutputPS C:\WINDOWS\system32> Get-ChildItem D:\Temp -Recurse -Force -Include Bac*     Directory: D:\Temp\GPO_backup\{C9C3DB4C-2E51-4201-B3C3-7C0F1ACECBE9} Mode                LastWriteTime         Length Name ----                -------------         ------ ---- -a----       24-11-2018     11:34           6215 Backup.xmlCommandWhen you use the wildcard character (*) at both the ends, file ... Read More

Search for a Specific Extension Using Get-ChildItem in PowerShell

Chirag Nagrekar
Updated on 23-Jan-2020 07:47:07

2K+ Views

To get the output of the get-childitem with a specific extension, we need to use –includeparameter.ExampleIn the below example, we will use the below script to get only .xml files.Get-ChildItem D:\Temp\ -Recurse -Include *.xmlOutputPS C:\WINDOWS\system32> Get-ChildItem D:\Temp\ -Recurse -Include *.xml     Directory: D:\Temp\GPO_backup\{C9C3DB4C-2E51-4201-B3C3-7C0F1ACECBE9} Mode                LastWriteTime         Length Name ----                -------------         ------ ---- -a----       24-11-2018     11:34           6215 Backup.xml -a----       24-11-2018     11:34       ... Read More

Install PlayOnLinux

Samual Sam
Updated on 23-Jan-2020 07:46:36

558 Views

Wine platform is developed for allowing you to run Microsoft Windows applications on Linux and other UNIX-based operating systems (MacOS X, FreeBSD, Solaris). PlayOnLinux is a graphical interface for Wine, which streamlines the installation process of well-known Windows applications and games under Wine platform by automatically configuring Wine as needed.Installing PlayonLinuxTo install playOnLinux use the following command –$ sudo apt-get install playonlinuxThe output should be like this –Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libgail-common liblouis-data liblouis2 python3-brlapi python3-louis python3-pyatspi python3-speechd qt-at-spi xbrlapi Use 'apt-get ... Read More

Advertisements