Create a New ext4 File System in Linux

Pradeep Elance
Updated on 25-Feb-2020 06:14:54

6K+ Views

The hard disk in a computer is formatted with specific file system so that the operating system can read and write into it. For UNIX based systems we have various type of file systems. In this article we will see how to format a new partition in hard disk with ext4 file system.Available Filesystem typesFirst we see what are the different file systems available for the current operating system. The below command lists all those file systems.$ ls -1 /sbin/mkfs*Running the above code gives us the following result −/sbin/mkfs /sbin/mkfs.bfs /sbin/mkfs.cramfs /sbin/mkfs.ext2 /sbin/mkfs.ext3 /sbin/mkfs.ext4 /sbin/mkfs.ext4dev /sbin/mkfs.fat /sbin/mkfs.minix /sbin/mkfs.msdos /sbin/mkfs.ntfs /sbin/mkfs.vfatLook ... Read More

Best Book to Learn Java Programming for Beginners

Daniol Thomas
Updated on 25-Feb-2020 06:14:12

268 Views

Following books are on top from popularity and content wise and are a good resource to learn java programming from beginner to advance level.

Difference Between super and this in Java Program

Mahesh Parahar
Updated on 25-Feb-2020 06:13:14

10K+ Views

Along with various other keywords Java also provides this and super as special keywords which primarily used to represent current instance of a class and it's super class respectively. With this similarity both these keywords have significant differences between them which are listed as below - Sr. No.Keythissuper1Represent and Referencethis keyword mainly represents the current instance of a class.On other hand super keyword represents the current instance of a parent class.2Interaction with class constructorthis keyword used to call default constructor of the same class.super keyword used to call default constructor of the parent class.3Method accessibilitythis keyword used to access methods of ... Read More

Difference Between Hadoop 1 and Hadoop 2

Mahesh Parahar
Updated on 25-Feb-2020 06:11:34

9K+ Views

As we know that in order to maintain the Big data and to get the corresponding reports in different ways from this data we use Hadoop which is an Open Source framework from Apache Software Foundation based on Java Programming Language.Now Apache introduces the next version of Hadoop which named as Hadoop 2 so as this post is focusing on differences between both of these versions.Following are the main differences between Hadoop 1 and Hadoop 2.Sr. No.KeyHadoop 1Hadoop 21New Components and APIAs Hadoop 1 introduced prior to Hadoop 2 so has some less components and APIs as compare to that ... Read More

Method Overloading with Autoboxing and Widening in Java

Arjun Thakur
Updated on 25-Feb-2020 06:08:01

269 Views

Widening refers to passing a lower size data type like int to a higher size data type like long. Method overloading is possible in such case. ExampleLive Demopublic class Tester {    public static void main(String args[]) {       Tester tester = new Tester();       short c = 1, d = 2;       int e = 1, f = 2;       System.out.println(tester.add(c, d));       System.out.println(tester.add(e, f));    }    public int add(short a, short b) {       System.out.println("short");       return a + b;    }    public int add(int a, int b) {       System.out.println("int"); return a + b;    } } OutputShort 3  Int 3

Difference Between grep and fgrep Command

Mahesh Parahar
Updated on 25-Feb-2020 06:05:24

798 Views

In any language or framework one of the most important and main feature is of searching the data. It not only denotes the performance of language but also represents in what manner the data is being stored. So specifically if we take an example of LINUX operating system there comes two of the important commands namely grep and fgrep.Both of these commands are used to search any string or regular expression in file, directory or even in multiple folders. Both these commands executes in such a way that processor starts analysing the target folder or destination and search for the ... Read More

Difference Between Fundamental and Derived Data Types in C++

Mahesh Parahar
Updated on 25-Feb-2020 06:00:18

430 Views

In programming data type denotes the type and nature of data which is intended to be use by the user. It is the data type which compiler or interpreter going to deal with and provides corresponding storing location in main memory.Now on the basis of nature of data Data type is mainly of two types one is Fundamental Data type and other is Derived Data type. Both these data types are used in programming and are equally important when need to implement the business logic over the data.Following are the important differences between Fundamental data types and Derived data typesSr. ... Read More

Change or Set System Locales in Linux

Pradeep Elance
Updated on 25-Feb-2020 06:00:00

3K+ Views

We often need to customise the operating system to become useful to our own preferences like the language we want to use the time zone we are in the type of currency which would become the default currency in the OS etc. In this article we will see how to customise these options which is known as locale.Current localeWe can check the current locally by using the locale command as shown below. We get list of variables which can be reset to a different value as per our choice later$ localeRunning the above code gives us the following result −LANG=en_US.UTF-8 ... Read More

Display Command Output or File Contents in Column Format in Linux

Pradeep Elance
Updated on 25-Feb-2020 05:58:07

703 Views

Sometimes there may be too many columns crammed into a single file. That makes it difficult to read the content of the file and point out which data belongs to which column. In order to have a better view, we ca use certain commands that will allocate space between the columns and also mark some separation characters that will make it clear to see the beginning and end of the column.Sample FileLets’ look at the below sample file which we will use to demonstrate the column command. $ cat iris.dataRunning the above code gives us the following result −Id, SepalLengthCm, ... Read More

Understand Types of Variables in Java

Fendadis John
Updated on 25-Feb-2020 05:40:16

121 Views

There are three kinds of variables in Java −Local variablesInstance variablesClass/Static variablesLocal VariablesLocal variables are declared in methods, constructors, or blocks.Local variables are created when the method, constructor or block is entered and the variable will  be destroyed once it exits the method, constructor, or block.Access modifiers cannot be used for local variables.Local variables are visible only within the declared method, constructor, or block.Local variables are implemented at stack level internally.There is no default value for local variables, so local variables should be declared and an initial value should be assigned before the first use.ExampleHere, age is a local variable. ... Read More

Advertisements