How To Clear Shell History In Ubuntu Linux ?

When you type something on linux shell, by default Linux save the commands what you type as history to “~/.bash_history” or /home/username/.bash_history file so that you can easily check what you have typed previously using “history” command. As you can see, we just showed last output of “history” command. You can use only “history” without … Read more

How to extract only specific files from tar.bz2 / tar.gz in Linux ?

The following shell script demos the creation of archive / tar and then use commands to check what are the contents of the tar without extracting the complete tar and then using command to extract only few selected files from the tar. For Creating Tar / Archive, we used below tar command with argument “cvjf”, … Read more

Using conditional statements, if and if-else in Python

When you are writing python program, sometimes you need to make certain checks on variables and based on which you need to take some decisions.. this same is called as Decision making statements in C programming Language. In this post, we will show you how you can use simple conditional statements “if” and “if-else” As … Read more

Install and Uninstall Android Application ( APK ) using ADB

Following shell script does, Subscribe with Valid Email Id to receive updates in Inbox. ( Secured by Google FeedBurner )     check if android application is installed find an apk path if android application is already installed. uninstall if its already installed install new apk if application is not installed

Shell script to check and mount a partition in Ubuntu

In the following script we check whether the current device is mounted or not by reading information from proc file /proc/mounts, if the device is not mounted, we use the “mount” command with sudo / superuser permission to mount the device to mount directory as mentioned in the beginning of script. Subscribe with Valid Email … Read more

Shell script to check if Android device is connected over USB

Android devices has a daemon adbd which helps it to get connected over USB using adb command on linux host. If you are doing some kind of automation such as taking logs or installing some applications from ubuntu command line, the very first thing we need to make sure if our device is connected and … Read more

Shell script for switching wifi channel using hopping

Using the below script we tries to connect to different wifi channels of hotspot using iwconfig command. Reference: Subscribe with Valid Email Id to receive updates in Inbox. ( Secured by Google FeedBurner )    

How to concatenate strings in Python ?

When you are working with strings in python, at some point in time, you would definitely need to join two strings to make a new string. Which has both strings combined. we call this as concatenation of strings. If you are new to python, read our all python articles from python page. This post shows … Read more

shell script to check if file is present or not in a directory

The below shell script can be used to check if the file is present or not in a specific directory Open your favorite editor and create a script as below, Subscribe with Valid Email Id to receive updates in Inbox. ( Secured by Google FeedBurner )     Now, lets say you want to search … Read more