Category Archives: Basics

git checkout remote branch – How to, Examples and Options

Git , the free and open source distributed version control system used by developers and development teams for their code base. Working with different teams and remote repositories may be challenging for developer working with local repositories only. Learn how git checkout remote branch works in git and related commands like fetch, pull and option like -b.

rmdir force in Linux ? – How to force remove Linux directories

rmdir is a command in windows to force remove directories.  The equivalent command in Linux and Unix  is –  rm , the  command is used to remove file and directories. Learn more about using rm command in Linux to force remove directories .

php redirect – How to, Examples, Issues & Solutions

php redirect is a convenient way to redirect https requests to another page. Learn about correct syntax,  response code , common errors using session data and time delayed redirection.

bash for loop Explained with Examples

bash , bourne again shell, provides shell scripting features in Linux and Unix /Unix like environments. bash off lots of functions and commands  and bash for loop is one of the most popular used function for the data processing . Learn more about bash for loop basic construction  , how to process a range of  data, define increments, using command outputs as inputs to for loop and more.

Getting Started With Python

Want to learn Python ?Getting Started with Python Kindle Edition
Start with this e-book at amazon,com. 

Getting Started with Python Kindle Edition

netstat – 10 Most common usage with examples

netstat is a command line utility in Unix, Linux and Unix like systems to show information about

  • network connections,
  • routing tables,
  • interface statistics,
  • mas-querade connections
  • multicast memberships

By default, netstat displays a list of open sockets of all configured address families , tcp , udp etc.
netstat provide very extensive network details and here are the top netstat usage with different options to get you the just the information you need.

vi editor cheat sheet in pdf format

vi editor , pronounced as Vee Iee editor is the default text editor in Unix and Linux distribution.   For new learners it may be difficult to get used to vi editor commands. To make this easy here is the vi editor cheat sheet in PDF format which can be printed, shared  and used for ready reference.

vi editor Cheat Sheet  in PDF format.

Here is an earlier article which discus vi editor in details 

fsck Messages, Meaning and Solutions

fsck message can be cryptic and many times it is difficult to understand it is great challenge to decide about the response to provide for fsck prompts.

This article describes  the fsck error messages and possible action that can be performed  during each phase of fsck.  If you are looking for fsck and related information, you can find it in this article fsck – Check & Repair Unix and Linux File Systems

These are the phases and detailed errors, messages  with their meaning

Top 10 Bash Programming Guides, Reference & Tools

Bash is a Unix/Linux  command interpreter (shell). Bash is the Bourne Again SHell created as part of  GNU Project.  Bash is an Bourne  shell compatible shell that incorporates useful features from the Korn shell (ksh) and C shell (csh). It offers functional improvements over Bourne shell  for both programming and interactive use. In addition, most Bourne shell scripts can be run by Bash without modification. Bash  is intended to conform to the IEEE POSIX P1003.2/ISO 9945.2 Shell and Tools standard.

Bash was originally written by Brian Fox of the Free Software Foundation. The current developer and maintainer is Chet Ramey of Case Western Reserve University.

The improvements offered by Bash include:

  • Command line editing
  • Unlimited size command history
  • Job Control
  • Shell Functions and Aliases
  • Indexed arrays of unlimited size
  • Integer arithmetic in any base from two to sixty-four

Here are the top 10 Bash Programming Guides, Reference  & Tools

How to Remove ^M in Linux & Unix

Control M ( ^M)  characters are introduced when you use  lines of text from a windows computer to  Linux or Unix machine.  Most common reasons are when you directly copy a file from a windows system or submit form data copied and pasted from a windows machine.

Detecting ^M characters

^M is non printable character and often becomes difficult to find, in order to see if your file contains any non printable character use the cat command with -v option

$cat -v filename

Methods to remove ^M

In all these method , real secret is not to type ^M using keyboard but rather typing in control key sequence to get the ^M control character.