Categories
Linux

cd

NAME cd – Change the shell working directory. SYNOPSIS cd [-L|-P] [dir] DESCRIPTION Change the shell working directory. Change the current directory to DIR. The default DIR is the value of the HOME shell variable. The variable CDPATH defines the search path for the directory containing DIR. Alternative directory names in CDPATH are separated by […]

Categories
How Linux

How to create multiple empty files at a time in Linux

touch command is used to create a empty file. Syntax: $ touch <file name> To create multiple empty file we can use below command. To create 1 to 100 files $ touch testfile{1..100}.txt To create a to z files $ touch testfile{a..z}.txt To create a 100 to 1 file with decrements of 2 $ touch […]

Categories
Java Programming

What causes a java.lang.ArrayIndexOutOfBoundsException and How to prevent it?

When trying to access an Array value at an undefined index, we will get the ArrayIndexOutOfBoundsException. To prevent this error we should access the values at a defined index only. In that if an Array has 3 elements the defined indexes will be 0,1,2. Any other index say 4 will be undefined. Example: public class […]