Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

No cookies to display.

Command of the week #2

This week’s command is: alias

This command is great. In short it allows you to create Pseudo commands.

For example, on the server that this site runs on (my server), I regularly need to check to see what connections my computer has initiated, and what services they’re through. I do this using the linux command netstat using the following command line string: “netstat -pan | grep tcp“. Since I’m not doing this blog on netstat I will not explain that to you. If you have any questions, just comment on this post below and either me(Jon) or Kyle will attempt to explain it to you.

Now isn’t that command a little bit cumbersome? I think so at least. This is where alias comes in handy.

To set up an alias in your *nix based profile do the following things:

  1. Login as your user
  2. Type in cd ~
  3. Edit your .bashrc file using the text editor of your choice. I’ll be using vi, so I’ll type in vi .bashrc
  4. You create an alias using the following syntax: alias NEW_COMMAND=”COMMAND STRING_TO BE EXECUTED”
  5. Using the example above you would type in the following: alias ns=”netstat -pan | grep tcp”

So now anytime that you enter “ns”, “netstat -pan | grep tcp” will be executed in it’s place.

I should mention that you don’t have to place the alias command in your .bashrc file. You can also run it on the commnad line, but it will only have its effect for the current session.

Hopefully this’ll help you out at some point.

More later,
Jon Howe

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright VirtJunkie.com © 2024