Software & Coding Articles

Page 74 of 83

What is an alias in PowerShell?

Chirag Nagrekar
Chirag Nagrekar
Updated on 14-Feb-2020 290 Views

In general, Alias means giving command to other names. In system admin life, they want short and familiar commands. PowerShell has verb-noun cmdlets that are very systematic but not practical in everyday life. So the System admins use PowerShell alias. For example - Dir or ls for the Get-ChildItem, cat or gc for the Get-Content.

Read More

How to get the list of all the commands available in the PowerShell?

Chirag Nagrekar
Chirag Nagrekar
Updated on 14-Feb-2020 3K+ Views

To get the list of all the commands installed in the system use the below command line. It will include all the Alias, Functions and Cmdlets.Get-CommandTo export them into the CSV file,Get-Command | Export-Csv D:\Temp\PowerShellcommands.csv - NoTypeInformationTo get only the cmdlets commands,Get-Command -CommandType CmdletSimilarly, you can get the commands for the alias and functions.If you want the list of commands starting with getting, you parameter –Verb.Get-Command -Verb GetTo get command starting with Set,Get-Command -Verb Set

Read More

How to start any program using PowerShell?

Chirag Nagrekar
Chirag Nagrekar
Updated on 14-Feb-2020 13K+ Views

If you have noticed, you can start notepad and calculator or other standard system utilities with the Windows Run or through the PowerShell console directly by typing just their names, but not the wordpad.exe, word, excel or any other application. It will throw an exception.For example, just type notepad.exe in PowerShell console and it will open the program but type wordpad.exe there will be an error.wordpad.exe − The term 'wordpad.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the ...

Read More

How to use PowerShell as a Calculator? Or How to use PowerShell for arithmetic operations?

Chirag Nagrekar
Chirag Nagrekar
Updated on 14-Feb-2020 2K+ Views

You can use the PowerShell console to perform arithmetic operations, the same way the calculator does.To do the addition operation, 2+3Output − 5For complex, additional operations as well it is too quick.10024455 + 554668 + 9964455Output − 20543578Floating numbers operation, 5569899.65 + 554886.32Output − 6124785.97To perform subtract operation, 55564488556 - 55141256665 Output − 423231891With Integer and floating number subtraction, 5569899 - 554886.32Output − 5015012.68Divide Operation, 556989 / 554Output − 1005.39530685921Multiplication operation, 5533 * 445Output − 2462185Multiple Operations, (445 + 5443) * 332 / 32 Output − 61088When you perform any arithmetic operation, when values separated by command, it will give ...

Read More

How to overwrite or remove PowerShell alias?

Chirag Nagrekar
Chirag Nagrekar
Updated on 14-Feb-2020 5K+ Views

You can overwrite the Powershell alias by redefining it. For example, if the alias is created Edit for Notepad.exe and if you want to overwrite it with another program, say wordpad.exe then use the below command.We will overwrite the Edit alias cmdlet with Wordpad.exe using the Set-Alias command. When you close the PowerShell session, it will remove newly created aliases and modified aliases.Set-Alias edit "C:\Program Files\Windows NT\Accessories\wordpad.exe"You cannot overwrite pre-defined aliases. It will throw an exception.For example, when you try to modify dir alias which points to Get-Content, error output will be as below.To remove newly created aliases without closing ...

Read More

How to create an array in PowerShell?

Chirag Nagrekar
Chirag Nagrekar
Updated on 14-Feb-2020 2K+ Views

To create or declare an array in PowerShell, there are few methods.You can directly assign values to the variable and separate it by comma (, ) and that variable becomes the variable.For example, $a = "Apple", "Dog", "Cat", "Banana", "Camel"$a is now an array. To access the variable you can use the Indexing method. The first value will be stored at 0, second at 1 and so on.$a[0] will give the output “Apple”, $a[1] will give the output “Dog” and so on. Negative indexing also works in the array. -1 is the last index, -2 is the second last and ...

Read More

Frequently Used Examples of 'Fuser' Command in Linux

Samual Sam
Samual Sam
Updated on 28-Jan-2020 401 Views

The fuser utility in Linux is a very smart Unix utility. As the name suggests, it offers knowledge about file user or the process that is currently utilizing the file or directory. This article explains about – Frequently used examples of ‘fuser’ Command in Linux.To get the more information about fuser, use the following command –$ fuserThe sample output should be like this –Usage: fuser [-fMuvw] [-a|-s] [-4|-6] [-c|-m|-n SPACE] [-k [-i] [-SIGNAL]] NAME... fuser -l fuser -V Show which processes use the named files, sockets, or filesystems. -a, --all             display unused files ...

Read More

How to Install a Software on Linux Using Yum Command?

karthikeya Boyini
karthikeya Boyini
Updated on 27-Jan-2020 2K+ Views

In this article, we will learn about “how to use the Yum command” for installing the packages. Also note that, the repositories on the Cent OS 6.7 YUM (Yellowdog Update Modified) is a tool used to develop by Redhat. You can use this materials for learning the YUM.Managing Software with YUMUse the yum utility to install or modify the software on your system in the following ways –New software installation from repositories.Installing software from an individual package file.Updating the existing software on your system.Removing unwanted software from your system.Installing Software from a Package FileThe yum commands used in this is ...

Read More

How to Host Files using GitHub?

Sharon Christine
Sharon Christine
Updated on 27-Jan-2020 1K+ Views

Before GitHub existed, all the companies have managed the programming source code in private. It was first introduced as a collaborative platform for developers and now almost all of the storage space online is shared here for collective work. Irrespective of major or minor companies, you will find and can also access all their GitHub accounts and download as well. It can be otherwise termed as a dump store of human knowledge.A common misconception that prevails is that, it is a development tool that is used only for coding and compiling computer languages. But the fact is far from it. ...

Read More

How to Monitor Your Ubuntu System with Sysdig?

Sharon Christine
Sharon Christine
Updated on 23-Jan-2020 304 Views

Sysdig is an open source application, It captures system state and activity from a running Linux instance, then saves, filters and analyzes. It is scriptable in Lua and consists of a command line interface and an effective interactive UI, Sysdig is a combination of strace + tcpdump + htop + iftop + lsof + transaction tracing + awesome sauce. This article explains about -“How To Monitor Your Ubuntu System with Sysdig”.Installing SysdigConfigure the apt repository with trusted Draios GPG key as shown below –# curl -s https://s3.amazonaws.com/download.draios.com/DRAIOS-GPG-KEY.public | apt-key add - # curl -s -o /etc/apt/sources.list.d/draios.list http://download.draios.com/stable/deb/draios.listTo update the package ...

Read More
Showing 731–740 of 825 articles
« Prev 1 72 73 74 75 76 83 Next »
Advertisements