Learn different approaches to performing update-or-insert operations using Spring Data JPA.
Also find me here:
Baeldung Editor
Eric Martin
Eric Martin has been a software engineer in Kansas City, Missouri, for over 20 years. He has been focused on designing and building enterprise Java applications in multiple industries. In his free time, he enjoys brewing beer, cooking, and spending time with his family.
Here's what I've reviewed (so far):
Baeldung on Java
- All
- Java (65)
- Java String (41)
- Java IO (30)
- Testing (29)
- Java Collections (29)
- Spring Boot (27)
- Core Java (26)
- JVM (22)
- Spring (19)
- Java Map (19)
- Java Concurrency (18)
- Spring Data (17)
- Persistence (17)
- Java Numbers (16)
- Java Array (16)
- Data (16)
- Security (14)
- Spring Security (12)
- NoSQL (12)
- Maven (12)
- JSON (12)
- Java Streams (11)
- Algorithms (11)
- DevOps (10)
- Architecture (10)
- Java Dates (9)
- HTTP Client-Side (9)
- REST (8)
- Logging (8)
- Cloud (8)
- Spring Cloud (7)
- Groovy (7)
- Gradle (7)
- Spring Web (6)
- Spring MVC (6)
- Jakarta EE (6)
- Jackson (6)
- Reactive (5)
- IDE (5)
- JPA (4)
- Docker (4)
- Networking (3)
- Artificial Intelligence (2)
- XML (1)
- Spring Persistence (1)
- Guava (1)
Introduction to Simple Java Mail
Filed under Java IO
Explore the process of setting up Simple Java Mail and learn how to send emails, including attachments and HTML content, handle exceptions, and more.
How to Intercept a Request and Add Headers in WebFlux
Filed under Spring Boot
Explore different ways of intercepting and adding custom headers for both server web requests and web client requests in Spring WebFlux
Introduction to DuckDB
Filed under Persistence
Learn about the advantages of the DuckDB database and some fundamental operations via illustrative examples
Install Java on macOS
Filed under Java
Learn how to install Oracle JDK via DMG package and OpenJDK via Homebrew package manager
Detect the Last Iteration in for Loops in Java
Filed under Java Collections
Explore different ways to determine if the current iteration is the last one when we loop over a Java List.
BigDecimal.ZERO vs. new BigDecimal(0)
Filed under Java Numbers
Explore the subtle yet significant distinctions between BigDecimal.ZERO and new BigDecimal(0) and discuss when to choose one over the other.
Recursively Sum the Integers in an Array
Filed under Java Array
Explore two approaches to recursively summing integers in an array and analyze their performance using the JMH tool.
All the Ways Java Uses the Colon Character
Filed under Core Java
Learn how Java uses the colon character in a variety of different ways.
Resolving Gson’s “Multiple JSON Fields” Exception
Filed under JSON
Discuss the causes for a tricky yet ultimately fixable IllegalArgumentException we can encounter when using Gson
Check if a double Is an Integer in Java
Filed under Java Numbers
Explore the various techniques available to check whether a double is, in fact, a mathematical integer.
Checking if an Object’s Type Is Enum
Filed under Java
Explore various approaches and best practices for determining if an object’s type is an enum.
Splitting Streams in Kafka
Filed under Data, Java Streams
Explore how to dynamically route messages in Kafka Streams.
Finding the N-th Occurrence of a Substring in a String in Java
Filed under Java String
Learn various ways to locate the n-th occurrence of a substring within a string using iterative, recursive, and regex-based solutions.
Difference Between “final static” and “static final”
Filed under Core Java
Learn the difference between final static and static final.
How to Get First or Last Entry From a LinkedHashMap in Java
Filed under Java Map
Learn various methods for retrieving the first and last key-value pairs from a LinkedHashMap
Localized Validation Messages in REST
Filed under REST, Spring Web
Learn to localize validation messages in a REST web service.
Difference Between ZipFile and ZipInputStream in Java
Filed under Java IO
Learn how to use ZipFile and ZipInputStream to read zip files, explore their functional differences, and evaluate their performance.
Passing Strings by Reference in Java
Filed under Java String
Learn how to change a method’s input String while preserving immutability and avoiding side effects.
Difference Between putIfAbsent() and computeIfAbsent() in Java’s Map
Filed under Java Map
Learn the differences between Java Map’s putIfAbsent() and computeIfAbsent() through examples.
Joining a List<String> in Java With Commas and “and”
Filed under Java Collections
Explore an interesting string concatenation problem: joining strings in a more natural language-like manner.
Get All Record Fields and Its Values via Reflection
Filed under Core Java
Explore how to retrieve all the fields and their values within a record class using Java’s Reflection API.
Rotate Arrays in Java
Filed under Algorithms, Java Array
Learn how to rotate an array by k rotations with brute force and more complex algorithms like reverse or cyclic replacements.
How to Remove Line Breaks From a File in Java
Filed under Java IO
Learn about the different kinds of line breaks and explore various approaches to removing line breaks from a file.
How to Subscribe a Kafka Consumer to Multiple Topics
Filed under Data
Learn three different methods of subscribing a Kafka consumer to multiple topics.
Partition a Stream in Java
Filed under Java Streams
Explore various ways of partitioning a Stream in Java.
How to Support UTF-8 Encoding in Eclipse
Filed under IDE
Learn how to enable UTF-8 encoding for all projects and per file type in Eclipse.
RSocket Interface in Spring 6
Filed under Spring
Explore the new declarative RSocket client feature in Spring 6.
Check if a List Contains a String Element While Ignoring Case
Filed under Java Collections
Explore two approaches to performing a case-insensitive check to determine if a string list contains a specific string.
Assert Regex Matches in JUnit
Filed under Testing
Explore several approaches to asserting regex matches in JUnit, empowering us to test our string patterns effectively.
Difference Between Hashtable and ConcurrentHashMap in Java
Filed under Java Map
Learn the differences between Hashtable and ConcurrentHashMap, delving into their performance metrics, synchronization features, and various other aspects.
How to Split an Integer Number Into Digits in Java
Filed under Java Numbers
Explore various approaches to splitting an integer number into its constituent digits using Java.
Extract CN From X509 Certificate in Java
Filed under Security
Learn several approaches to extracting the CN value of a certificate file.
Create List of Object From Another Type Using Java 8
Filed under Java Collections
Explore how to create a list of objects of a different type based on a given list.
What Does “––>” Mean in Java?
Filed under Core Java
Discuss interesting usages of –> in Java.
Get the Indexes of Regex Pattern Matches in Java
Filed under Java String
Explore obtaining the indexes of pattern matches within the original input when using a Java regex.
Extract Text Between Square Brackets
Filed under Java String
Explore how to extract content between square brackets in a text.
Get the First n Elements of a List Into an Array
Filed under Java Array
Learn the steps to retrieve the first n elements from a List and convert them into an array in Java.
Convert an ArrayList of String to a String Array in Java
Filed under Java String
Learn different approaches to convert a Java String ArrayList to a String array through examples.
Lock Header Rows With Apache POI
Filed under Java IO
Learn how to use Apache POI to lock header rows in Excel spreadsheets
Get a Continuous Stream of Logs for Pods in Kubernetes
Learn how to use the kubectl logs command to get a continuous stream of logs from the Kubernetes pods.
Converting an int[] to HashSet in Java
Filed under Java Array
Learn multiple approaches to converting an int[] to a HashSet in Java.
Remove Duplicate Values From HashMap in Java
Filed under Java Map
Learn a few ways to remove duplicate values from a Java HashMap.
What’s the Difference Between Iterator and ListIterator?
Filed under Java Collections
Learn how to use Java’s Iterator and ListIterator and explore the key differences between them.
Understanding the java.net.SocketException Broken Pipe Error
Filed under Java IO
Learn about the Java “java.net.SocketException: “Broken pipe” error, understand the leading cause of the exception, and see how to fix it.
How to Modify a Key in a HashMap?
Filed under Java Map
Learn the remove() then put() approach to replacing a key in a Java HashMap.
Convert Long to BigDecimal in Java
Filed under Java Numbers
Explore two effective approaches for converting a Long to a BigDecimal in Java.
Split a String Into Digit and Non-Digit Substrings
Filed under Java String
Explore different approaches and techniques for breaking an input string into a string array or list containing digit and non-digit string elements in the original order
Check if a File Is Empty in Java
Filed under Java IO
Explore a few efficient and straightforward ways to check if a file is empty in Java.
Removing JSON Elements With Jackson
Filed under Jackson
Explore how to remove JSON elements using Jackson and understand the process through practical examples.
Difference Between Instant and LocalDateTime
Filed under Java Dates
Learn about the difference between the Instant and LocalDateTime classes introduced with Java 8.
Convert a List of Strings to a List of Integers
Filed under Java Collections
Learn three ways of converting a list of strings to a list of integers.
Listing All AWS S3 Objects in a Bucket Using Java
Learn how to list all objects in an S3 bucket using AWS SDK V2 for Java.
Check if a String Is All Uppercase or Lowercase in Java
Filed under Java String
Explore different approaches to check if a string is all uppercase or lowercase in Java.
Sort Date Strings in Java
Filed under Java String
Explore different approaches to effectively sorting date strings in Java.
Difference Between get() and navigate() in Selenium WebDriver
Filed under Testing
Learn the difference between get() and navigate() methods in the Selenium WebDriver API.
Get Unique Values From an ArrayList in Java
Filed under Java Collections
Explore a few techniques for obtaining unique values from an ArrayList in Java.
Returning a Value After Finishing Thread’s Job in Java
Filed under Java Concurrency
Learn how to return a value from a thread that has its job terminated
Converting Map<String, Object> to Map<String, String> in Java
Filed under Java Map
Learn different ways to convert a Map to Map.
Disable Wildcard Import in IntelliJ
Filed under IDE
Learn how to set three main configuration options to disable wildcard imports in Java files in IntelliJ.
Java Serialization: readObject() vs. readResolve()
Filed under Core Java
Learn the differences between the readObject() and readResolve() methods of the Java Serialization API.
Set Default Value for Elements in List
Filed under Java Collections
Explore various approaches to initialize a Java List with default values.
Introduction to MinIO
Filed under Cloud
A brief introduction to MinIO, an object storage engine with full S3 compatibility
Write Console Output to Text File in Java
Filed under Java IO
Lern how to make System.out.println() print data to a file by replacing the default System.out
How to Take Input as String With Spaces in Java Using Scanner?
Filed under Java IO, Java String
Learn how to read values containing spaces from a Scanner through examples.
Difference Between implementation and compile in Gradle
Filed under Gradle
Learn the difference between “implementation” and “compile” in Gradle and provide best practices for effective dependency management
ArrayBlockingQueue vs. LinkedBlockingQueue
Filed under Java Collections, Java Concurrency
Learn about the implementation differences between ArrayBlockingQueue and LinkedBlockingQueue.
Convert an OutputStream to an InputStream
Filed under Java IO
Explore two approaches to converting an OutputStream to an InputStream: using a byte array and a pipe.
Storing Java Scanner Input in an Array
Filed under Java Array, Java IO
Learn how to store the input from a Scanner into an array with three different scenarios and examples.
Comparing Two Byte Arrays in Java
Filed under Java Array
Learn common pitfalls when comparing the contents of two arrays and explore the correct way to compare two byte arrays.
Remove Punctuation From a String in Java
Filed under Java String
Learn how to remove punctuation from a string using the standard String.replaceAll() method.
Print “” Quotes Around a String in Java
Filed under Java String
Explore three different approaches to printing a string with quotes (“) around it.
Difference Between Java’s “char” and “String”
Filed under Java String
Learn the differences between char and String in Java.
Automatically Create Schemas for H2 In-Memory Database
Filed under Persistence
Learn several ways to ensure that our H2 in-memory database is automatically initialized and ready to use for querying when our application starts.
Find the Most Frequent Characters in a String
Filed under Java String
Learn three approaches to finding the most frequent characters in a string, with examples.
Getting the Text That Follows After the Regex Match in Java
Filed under Java String
Learn two variations on the problem of extracting text that follows after a regex match and how to do it using Java.
Integer.parseInt(scanner.nextLine()) and scanner.nextInt() in Java
Filed under Java IO
Learn the differences between Integer.parseInt(Scanner.nextLine()) and Scanner.nextInt() through examples.
Execute Tests Based on Active Profile With JUnit 5
Filed under Spring Boot, Testing
Learn how to execute tests based on the active Spring profile using JUnit 5.
Check if a Specified Key Exists in a Given S3 Bucket Using Java
Filed under Cloud
Learn how to check if a specified key exists in an Amazon S3 bucket using Java.
Implicit Wait vs Explicit Wait in Selenium Webdriver
Filed under Testing
Explore the differences between the wait types in Selenium and learn a few best practices when using them in tests.
Differences Between Classpath and Sourcepath
Filed under Core Java
Learn some key differences between sourcepath and classpath. Explore their usage in the command line.
Java Helper vs. Utility Classes
Filed under Architecture, Java
Explore the difference between Java helper and utility classes
A Guide to Spring Cloud Azure Key Vault
Filed under Security, Spring Cloud
Explore the fundamental principles of cloud-native development and the benefits of using Spring Cloud Azure Key Vault.
Generate the Same UUID From a String in Java
Filed under Java String
Learn how to generate the same UUID objects from a string.
Convert Boolean to String in Java
Filed under Java String
Explore various ways of converting boolean values to strings.
SAML with Spring Boot and Spring Security
Filed under Spring Boot, Spring Security
Learn how to sett up SAML2 with Spring Boot.
Convert a Number to a Letter in Java
Filed under Java Numbers
Learn a few ways of converting an integer to an English letter.
Can Stream.collect() Return the null Value?
Filed under Java Streams
Learn whether Java’s Stream.collect() can return null.
Handle Duplicate Keys When Producing Map Using Java Stream
Filed under Java Map, Java Streams
Explore two approaches to handling duplicated keys when producing a Map result using Stream API.
Guide to Sending Post Request via cURL With Data From a File
Filed under Networking
Learn how to send data from files using cURL with the –data and –form options.
How to Post Raw Body Data With cURL
Filed under Networking
Learn how to use cURL for sending raw body data over a POST request.
Map Date Types With OpenAPI Generator
Filed under Java Dates
Learn how to map dates in various formats with OpenAPI
Combining Two Lists Into a Map in Java
Filed under Java Map
Learn three ways to combine two given lists into a map through examples
Difference Between exchange(), postForEntity(), and execute() in RestTemplate
Filed under HTTP Client-Side, REST, Spring
Learn three different ways to send a HTTP POST request using Spring’s RestTemplate.
Check if Object Is an Array in Java
Filed under Java Array
Learn two ways to check if a given object is an array.
Understanding the Difference Between Stream.of() and IntStream.range()
Filed under Java Streams
Learn about Stream.of() and IntStream.range() and learn about certain operations that may turn a Stream from “lazy” to “eager”.
How Do I Generate a Dashboard Report in JMeter?
Filed under Testing
Learn about generating JMeter dashboard reports which are a more useful, efficient, and easy way to analyze data than mere text
Single Assert Call for Multiple Properties in Java Unit Testing
Filed under Testing
Learn three approaches to verifying multiple properties in one assert call using JUnit5 and AsssertJ.
Return Absolute Difference of Two Integers in Java
Filed under Java Numbers
Explore calculating the absolute difference between two integers.
Check if an Integer Value Is Null or Zero in Java
Filed under Java Numbers
Learn a few different ways to check if a given Integer instance’s value is null or zero.
Comparing a String to an Enum Value in Java
Filed under Java String
Learn how to compare a String to an enum constant through examples.
Multiply a BigDecimal by an Integer in Java
Filed under Java Numbers
Learn a few ways to multiply BigDecimal by an Integer.
Storing Data Triple in a List in Java
Filed under Java Collections
Explore how to store triples in a list with examples.
Case-Insensitive Searching in ArrayList
Filed under Java Collections
Learn three approaches to perform case-insensitive searching in ArrayList.
Getting Class Type From a String in Java
Filed under Core Java
Learn how to use the Class.forName() method to obtain the Class object.
Difference Between JPA and Spring Data JPA
Filed under JPA
Learn how Spring Data JPA and JPA both work with some high-level overviews and code snippets.
Converting a String Array Into an int Array in Java
Filed under Java Array
Learn two ways to convert a string array to an integer array through examples
Extracting JAR to a Specified Directory
Filed under Java
Learn two approaches to extracting a JAR file to a specified directory
Convert a List of Integers to a List of Strings
Filed under Java Collections
Learn three ways to convert a list of integers to a list of strings in Java.
Guide to Splitting a String by Whitespace in Java
Filed under Java String
Learn how to split a String by whitespace characters, such as space, tab, or newline, using multiple approaches
Alternatives for instanceof Operator in Java
Filed under Core Java
Learn alternatives to the traditional instanceof approach to improve code design and readability.
Difference Between Map.ofEntries() and Map.of()
Filed under Java Map
Take a closer look at these two static factory methods for immutable maps and explain which one is suitable for which purpose.
Spring Boot FeignClient vs. WebClient
Filed under HTTP Client-Side, Spring Boot
Compare two styles of writing web clients in Spring.
Enable and Disable Endpoints at Runtime With Spring Boot
Filed under Spring Boot
Learn to enable and disable endpoints at runtime in a Spring Boot application using a few popular libraries, such as Spring Cloud, Spring Actuator, and Apache’s Commons Configuration.
Thread vs. Single Thread Executor Service
Filed under Java Concurrency
Learn the difference between a thread and an executor service having a single worker thread.
Spring @EnableMethodSecurity Annotation
Filed under Spring Security
Learn the main features of @EnableMethodSecurity and how it replaces @EnableGlobalMethodSecurity.
Filling a List With All Enum Values in Java
Filed under Java Collections
Learn three approaches to get a List object that contains all instances of an enum
Slicing Arrays in Java
Filed under Java Array
Learn how to get a subarray of a given array in Java
Difference Between URI.create() and new URI()
Filed under REST
Learn the difference between instantiating a URI object using the constructor and the URI.create() method.
Fixing the “java: integer number too large” Error
Filed under Java Numbers
Learn two common pitfalls when we work with integer literals in Java.
Convert String to String Array
Filed under Java String
Explore how to convert a String into a String array (String[])
Convert String to char in Java
Filed under Java String
Learn how to convert a String to a char in Java.
Capitalize the First Letter of a String in Java
Filed under Java String
Learn how to convert a given string’s first character to upper case.
Guide to Resilience4j With Spring Boot
Filed under Spring Boot
Learn how to use the Resilience4j library with a simple Spring Boot application.
Java Literals
Filed under Core Java
Look at the different ways of specifying and using literals in Java.
Using Streams to Collect Into a TreeSet
Filed under Java Streams
Explore how to collect elements in a Stream into a TreeSet.
Initializing a Boolean Array in Java
Filed under Java Array
Learn how to initialize a boolean or Boolean array in Java.
Guide to the Storage Engine in Apache Cassandra
Dive into the internals of the storage engine used by Apache Cassandra.
String Concatenation in Java
Filed under Java String
Learn how to concatenate strings in Java.
Getting the Filename From a String Containing an Absolute File Path
Filed under Java IO
Learn how to extract the filename from an absolute path using core Java and Apache Commons.
Guide to Find the Java .class Version
Filed under JVM
Learn how to find the Java release version for .class and jar files.
Connect to Multiple Databases Using Spring Data MongoDB
Filed under NoSQL, Spring Data
Learn how to create multiple connections with Spring Data MongoDB.
Make Division of Two Integers Result in a Float
Filed under Java Numbers
Learn why the division of integers results in integers and how to get a float result.
Remove the Last Character of a Java StringBuilder
Filed under Java String
Learn multiple ways to remove the last character from a StringBuilder sequence
List All Factors of a Number in Java
Filed under Java Numbers
Learn how to find all factors of an integer using Java.
How to Parse an INI File in Java
Look at a couple of libraries that can help us parse INI files in Java
Armstrong Numbers in Java
Filed under Java Numbers
Learn how to check if an integer is an Armstrong number and generate OEIS sequence A005188 up to a given limit
Toggle a Boolean Variable in Java
Filed under Java
Learn how to build a null-safe method to toggle a given boolean variable in Java
Check if a Number Is Positive or Negative in Java
Filed under Java Numbers
We’ll discuss a few ways to solve a simple problem: how to check whether a given number is positive or negative in Java
Debugging an Application Running in Docker With IntelliJ IDEA
Filed under Docker
Learn different configuration options we can use to debug a dockerized application in IntelliJ
Guide to Check if Apache Kafka Server Is Running
Filed under Data
Learn a few strategies to determine if the Kafka server is running
Named Placeholders in String Formatting
Filed under Java String
Learn how to replace parameters in template-based strings from a set of values
Arrays.asList() vs Collections.singletonList()
Filed under Java Collections
Learn about the Arrays.asList() method and the Collections.singletonList() method
Get the Current Stack Trace in Java
Filed under Java
Learn how to get a stack trace using the Thread and Throwable classes
Volatile vs. Atomic Variables in Java
Filed under Java Concurrency
Learn the difference between the volatile keyword and atomic classes and what problems they solve
Spring Security: Upgrading the Deprecated WebSecurityConfigurerAdapter
Filed under Spring Security
Learn how to create a Spring Security configuration without using WebSecurityConfigureAdapter
Reading Flux Into a Single InputStream Using Spring Reactive WebClient
Learn how to read Flux into a single InputStream
Remove Whitespace From a String in Java
Filed under Java String
Explore common scenarios of removing whitespace from a String in Java
A Guide to Java Source and Target Options
Filed under Java
Learn how the -source and -target options work in Java 8 and how they’ve evolved from Java 9 onwards
Get the Full Path of a JAR File From a Class
Filed under Java
Explore how to find the JAR file and its full path from a given class
Guide to Find in MongoDB
Filed under NoSQL
Learn about the find operator in the MongoDB Shell query and then use the Java driver code
Check if at Least Two Out of Three Booleans Are True in Java
Filed under Java
Explore a few different approaches to check if there are at least two trues in three given booleans
Check if BigDecimal Value Is Zero
Filed under Java Numbers
Explore how to check if a BigDecimal object’s value is zero and learn a common pitfall
Java “int/char Cannot Be Dereferenced” Error
Filed under Java
Take a closer look at the Java error “int cannot be dereferenced”, learn the leading cause of the exception, and see how to fix it.
Reverse an ArrayList in Java
Filed under Java Collections
Learn how to reverse an ArrayList through examples
Load Testing Using Postman
Filed under Testing
Learn how to use Postman collections to perform simple load testing
Spring Web Service Integration Tests with @WebServiceServerTest
Filed under Spring Boot, Testing
Learn how to write integration tests for SOAP web services built using Spring Boot
How to Play Sound With Java
Filed under Java
Learn how to play sound two ways using the Java Sound API
Constraint Composition with Bean Validation
Filed under Java
Learn how to group multiple constraints under a single, custom annotation to reduce code duplication and improve readability
Find Files That Match Wildcard Strings in Java
Filed under Java IO
Learn how to search for files using wildcard patterns in Java
Working With a List of Lists in Java
Filed under Java Collections
Take a closer look at the Java List of Lists data structure and explore some everyday operations
Spring Boot Configuration Properties Migrator
Filed under Spring Boot
Explore a support system provided by Spring to facilitate Spring Boot upgrades
Return Only Specific Fields for a Query in Spring Data MongoDB
Filed under NoSQL, Spring Data
Learn how to use projections in Spring Data MongoDB to restrict the fields that are returned from a query
Apache HttpClient vs. CloseableHttpClient
Filed under HTTP Client-Side
Look at the difference between Apache HttpClient API’s HttpClient and CloseableHttpClient
Convert Byte Size Into a Human-Readable Format in Java
Filed under Java
Explore how to convert file size in bytes into a human-readable format in Java
Java Error “bad operand types for binary operator”
Filed under Java
Learn why we may encounter the Java compile-time error “bad operand types for binary operator” and how to resolve the problem
Add Prefix to All Spring Boot Controllers
Filed under Spring Boot
Look at different ways to use a common prefix for all Spring Boot controllers
Find the Difference Between Two Sets
Filed under Java Collections
Learn how to find the asymmetric and symmetric differences between two Set objects through examples
Logging MongoDB Queries with Spring Boot
Filed under NoSQL, Spring Boot
Learn how to enable a debug logging level for Spring Data MongoDB
Read User Input Until a Condition Is Met
Filed under Java IO
Learn how to handle multiple-line user input in Java
Java Operators
Filed under Core Java
Walk through all Java operators to understand their functionalities and how to use them
Pretty-Print XML in Java
Filed under XML
Learn two approaches to pretty-print an XML file in Java
Acquire a Lock by a Key in Java
Filed under Java Concurrency
Learn how we can get a lock on a specific key to prevent concurrent actions on that key without impeding actions on other keys
Authentication With Spring Security and MongoDB
Filed under NoSQL, Spring Security
Learn how to authenticate a user using Spring Security and MongoDB
Introduction to OAuth2RestTemplate
Filed under Spring Security
Learn how to use Spring OAuth2RestTemplate to make OAuth2 REST calls
Read a File Into a Map in Java
Filed under Java Map
Learn two approaches to read content from a text file and save it in a Java Map object along with three strategies to handle duplicate keys
Enable Logging for Spring Security
Filed under Logging, Spring Security
Leran how to modify the Spring Security logging level
Using Spring Cloud Config Without Git
Filed under Spring Cloud
Learn how to use Spring Cloud Config without git as the data store
Error: “trustAnchors parameter must be non-empty”
Filed under Security
Learn the reasons for the error: “java.security.InvalidAlgorithmParameterException: trustAnchors parameter must be non-empty” and how to fix it
Cassandra Query Cheat Sheet
Filed under NoSQL
Learn the essential concepts of Cassandra query language (CQL) and how to apply them
Change Cell Font Style with Apache POI
Filed under Java IO
Learn how to modify the font style of cells in a Microsoft Excel document
Constructor Specification in Java
Filed under Core Java
Learn the rules that Java language specified for the declaration of a constructor
Introduction to Spring Cloud Load Balancer
Filed under Spring Cloud
Learn how to use Spring Cloud Load Balancer to create more fault-tolerant applications
Keycloak Integration – OAuth2 and OpenID with Swagger UI
Filed under Security
Learn how to test a REST service that uses Keycloak for authentication and authorization with Swagger UI
Why Maven Uses a Different JDK
Filed under Maven
Learn why Maven might use a different version of Java than the default one set in the system
Numeric Format Using POI
Filed under Java IO
Learn how to format numeric cells in Excel using Apache POI
Java Implicit Super Constructor is Undefined Error
Filed under Java
Learn about Java’s “implicit super constructor is undefined” error and how to resolve it
JMX Ports
Filed under Java
Learn which ports are opened by JMX on startup
Java HashMap With Different Value Types
Filed under Java Map
Learn two approaches on how to make a Java HashMap support different types’ value data
Debugging WebSockets
Filed under Spring Web
Learn to debug WebSockets using browsers and other popular tools
Serialize and Deserialize Booleans as Integers With Jackson
Filed under Jackson
Learn how to serialize Boolean values into integers and numeric strings and how to deserialize them back
Difference Between Gradle Test and Check
Filed under Gradle
Learn the difference between the Gradle test and check tasks and identify exactly what each one does and when it makes sense to use them
Invoke a Static Method Using Java Reflection API
Filed under Java
Learn how to invoke public and private static methods using the Java Reflection API
Remove HTML Tags Using Java
Filed under Java String
Learn how to remove all HTML tags and extract the text from an HTML document string
List All the Classes Loaded in the JVM
Filed under JVM
Learn different techniques to list all classes loaded in the JVM
Initialization Vector for Encryption
Filed under Security
Learn how to use an Initialization Vector (IV) with encryption algorithms and the best practices while using the IV
Guide to Garbage Collector Roots
Filed under JVM
Learn what GC roots are and their usage in the garbage collection process
Splitting a Java String by Multiple Delimiters
Filed under Java String
Learn different options for splitting an input string by multiple delimiters using regular expressions, Google Guava, and Apache Commons
Overriding Spring Boot Managed Dependency Versions
Filed under Spring Boot
Learn how to override Spring Boot managed dependencies and their versions with both Maven and Gradle.
Get a Field’s Annotations Using Reflection
Filed under Java
Learn how to get a field’s annotations and how the retention meta-annotation works
Hibernate’s “Object References an Unsaved Transient Instance” Error
Filed under Persistence
Learn how to define a proper CascadeType to solve the “org.hibernate.TransientObjectException: object references an unsaved transient instance” error
REST vs. gRPC
Filed under REST
Compare two architectural styles for web APIs
JUnit 4 on How to Ignore a Base Test Class
Filed under Testing
Learn possible solutions to skip running tests from base test classes in JUnit 4
Count Spaces in a Java String
Filed under Java String
Learn various ways to count how many spaces are in a string through examples
Maven dependencyManagement vs. dependencies Tags
Filed under Maven
Learn the similarities and differences of Maven’s dependencyManagement and dependencies tags
Performance of System.arraycopy() vs. Arrays.copyOf()
Filed under Java Array
Learn about the implementation and performance of System.arraycopy() and Arrays.copyOf()
Generate a Java Class From JSON
Filed under JSON
Learn how to create a Java class from a JSON object using the jsonschema2pojo library
Format a Milliseconds Duration to HH:MM:SS
Filed under Java Dates
Learn how to use Java’s Duration, TimeUnit, and third-party libraries to format a duration to a specific format
Cassandra Partition Key, Composite Key, and Clustering Key
Learn how a partition key, composite key, and clustering key form a primary key and also how they differ
Run JUnit Test Cases From the Command Line
Filed under Testing
Learn how to run JUnit 5 tests directly from the command line with and without Maven
Deploying a Java War in a Docker Container
Filed under Docker
Learn how to deploy a Java WAR file in a Docker container using the official Tomcat Docker image
Running a Single Test or Method With Maven
Learn how to execute tests during a Maven build using the Maven surefire plugin
An Intro to Dapr with Spring Cloud Gateway
Filed under Spring Cloud
Learn how to configure and start the Dapr sidecar and how it then takes care of cloud-native concerns such as service discovery, communication, and tracing
Disable the Maven Javadoc Plugin
Filed under Maven
Learn how to temporarily disable the Javadoc generation in Maven builds.
Java Annotation Attribute Value Restrictions
Filed under Core Java
Learn some reasons for this limitation and look under the hood of the JVM to explain it better
Is java.sql.Connection Thread-Safe?
Filed under Java Concurrency, Persistence
Learn if java.sql.Connection implementations are thread-safe
Why Missing Annotations Don’t Cause ClassNotFoundException
Filed under Java
Learn why missing annotations won’t cause any exceptions at runtime
Configuring the Server Port on Quarkus Applications
Filed under DevOps
Learn a couple of ways to configure the application port in Quarkus
Find the GC Algorithm Used by a JVM Instance
Filed under JVM
Learn different approaches to find the GC algorithm used by a particular JVM instance
Start Two Threads at the Exact Same Time in Java
Filed under Java Concurrency
Learn two approaches to start two threads simultaneously: using CountDownLatch and CyclicBarrier
Converting Camel Case and Title Case to Words in Java
Filed under Java String
Learn how to find the words in mixed case strings using regular expressions, and how to convert them into sentences or titles
Native Images with Spring Boot and GraalVM
Filed under Spring
Learn how to use Spring Native to compile and build native images using Buildpacks and GraalVM’s native build tools
Connection Timeout vs. Read Timeout for Java Sockets
Filed under Java, Networking
Learn about the timeout exceptions of Java socket programming
Guide to the ModelAssert Library for JSON
Learn how to write assertions and comparisons between JSON values using ModelAssert
Capturing Image From Webcam in Java
Filed under Java
Explore a few Java libraries that allow us to capture images by accessing the webcam
Mask Sensitive Data in Logs With Logback
Learn how to use the PatternLayout feature to mask sensitive data in application logs with Logback
Non-Capturing Regex Groups in Java
Filed under Java String
Explore how to use non-capturing groups in Java Regular Expressions
Writing an Enterprise-Grade AWS Lambda in Java
Learn how to include configuration and logging capabilities in an AWS Lambda, as well as libraries that reduce boilerplate code, while still keeping things lightweight
Using Cucumber with Gradle
Learn a few ways to integrate Cucumber with Gradle in order to run BDD specifications as part of the project build
Downloading Email Attachments in Java
Filed under Java
Learn how we can download email attachments using the JavaMail API
Difference Between Super, Simplest, and Effective POM
Filed under Maven
Learn the differences between different types of project object models in Maven
JVM Parameters InitialRAMPercentage, MinRAMPercentage, and MaxRAMPercentage
Filed under JVM
Learn about JVM parameters InitialRAMPercentage, MinRAMPercentage, and MaxRAMPercentage for setting the RAM percentages that the JVM will use for the heap
Overriding Column Definition With @AttributeOverride
Filed under JPA
Learn how to use @AttributeOverride to change a column mapping
Split a String in Java and Keep the Delimiters
Filed under Java String
Learn how to split a string in such a way that the delimiters are part of the result
HandlerInterceptors vs. Filters in Spring MVC
Filed under Spring MVC
Compare the Java servlet Filter and the Spring MVC HandlerInterceptor and learn when one might be preferable over the other
Fixing the NoSuchMethodError JUnit Error
Filed under Testing
Learn how to fix the NoSuchMethodError and NoClassDefFoundError JUnit errors
Mapping PostgreSQL Array With Hibernate
Filed under Persistence
Explore a few ways to map the PostgreSQL array with Hibernate
Concatenate Two Arrays in Java
Filed under Java Array
Learn how to concatenate two arrays in Java using the standard Java API and commonly used libraries
JVM Storage for Static Members
Filed under JVM
Learn about JVM storage for the static methods and members
Split Java String by Newline
Filed under Java String
Learn different ways to split a Java String by newline characters
Guide to Setting Up Apache Kafka Using Docker
Learn how to create single-node and multi-node setups of Apache Kafka in Docker
Java NIO DatagramChannel
Filed under Java IO
Learn about Java NIO’s DatagramChannel class that allows the creation of a datagram channel to send/receive UDP packets
Usage of the Hibernate @LazyCollection Annotation
Filed under Persistence
Learn about the two main design patterns for fetching and how they relate to the @LazyCollection annotation in Hibernate
Returning Stream vs. Collection
Filed under Java Collections, Java Streams
Explore Java Streams and Collections and discuss various scenarios that suit their respective uses as return values
The Java final Keyword – Impact on Performance
Filed under Core Java
Explore if there are any performance benefits from using the final keyword on a variable, method, and class
Generate WSDL Stubs with Maven
Filed under Maven
Learn how to configure the JAX-WS maven plugin to generate Java classes from a WSDL file
Guide to Purging an Apache Kafka Topic
Filed under Data
Explore a few strategies to purge data from an Apache Kafka topic
Insert a Row in Excel Using Apache POI
Filed under Java IO
Learn how to inser a new row between two rows in an Excel file using the Apache POI library
Java Deque vs. Stack
Filed under Java Collections
Compare the Java Stack class and the Deque interface and learn why we should use Deque over Stack for LIFO stacks
Configuring Message Retention Period in Apache Kafka
Learn how to configure time-based message retention properties for Kafka topics
Java Warning “Unchecked Cast”
Filed under Java Collections
We’ll discuss what “unchecked cast” compiler warning means, why we’re warned, and how to solve the problem
Get List of JSON Objects with WebClient
Filed under HTTP Client-Side, JSON, Spring Web
Learn how to convert a JSON Array into a Java Array of Object, Array of POJO, and a List of POJO using Spring WebClient
Bad Practices With Synchronization
Filed under Java Concurrency
Learn about a few bad practices associated with synchronization and the better approaches for each use case
Java Warning “unchecked conversion”
Filed under Core Java
Take a deeper look at the “unchecked conversion” compiler warning message
Structural Patterns in Core Java
Filed under Architecture, Java
Learn how some core libraries in Java have adopted the seven core structural design patterns
Experimental Garbage Collectors in the JVM
Filed under JVM
Learn the new Shenandoah garbage collector and how it compares against other garbage collectors
Binary Semaphore vs Reentrant Lock
Filed under Java Concurrency
Learn the differences between binary semaphores and reentrant locks and see which one is best suited in common situations
Jackson: java.util.LinkedHashMap cannot be cast to X
Learn why the “java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to X” exception occurs and how to solve the problem
Difference Between JSF, Servlet, and JSP
Filed under Architecture
Explore the purpose of each technology, its lifecycle, and prominent features.
Difference Between spring-boot:repackage and Maven package
Filed under Maven, Spring Boot
Learn the difference between mvn:package and spring-boot:repackage
Redis vs MongoDB
Filed under NoSQL, Persistence
Learn some features offered by Redis and MongoDB and see when to use Redis or MongoDB by comparing them against each other
Viewing Contents of a JAR File
Filed under Java
Learn ways to list a JAR file’s content from the command-line
Jdbc URL Format for Different Databases
Filed under Persistence
Take a closer look at the JDBC URL formats of several widely used databases: Oracle, MySQL, Microsoft SQL Server, and PostgreSQL
Get a Filename Without the Extension in Java
Learn various ways to remove the extension from a filename
Thymeleaf Variables
Filed under Spring Boot
Learn how to define and use variables in Thymeleaf
Digital Certificate: How to Import .cer File into Truststore File
Filed under Security
Learn about a few tools that we can use to import certificates in .cer format into the client’s truststore
Guide to the System Stubs Library
Filed under Testing
Learn the importance of being able to mock system resources and how System Stubs allows for complex configurations of stubbing with JUnit 4 and JUnit 5 plugins
New Features in Java 15
Filed under Core Java
Look at some of the new features of Java 15 as well as other changes that are of interest to Java developers
The transient Keyword in Java
Filed under Core Java
Learn about the transient keyword and see its behavior through examples
AbstractMethodError in Java
Filed under Java
Take a closer look at Java’s AbstractMethodError and understand what it is and when it may happen
Get Names of Classes Inside a JAR File
Filed under Java
Learn how to get names of classes inside a given JAR file and how to load classes from a JAR file at runtime.
Accessing Keycloak Endpoints Using Postman
Learn about the Keycloak REST APIs and how to call them in Postman
Constants in Java: Patterns and Anti-Patterns
Filed under Java
Learn about using constants in Java with a focus on common patterns and anti-patterns
Performing Calculations in the Database vs. the Application
Filed under Persistence
Explore the advantages and disadvantages of performing calculations in the database and application code
Get a List of Trusted Certificates in Java
Filed under Security
Learn how to read a list of trusted certificates in Java through quick and practical examples
Get the Running Port in Spring Boot
Filed under Spring Boot
Learn how to get the HTTP port programmatically in a Spring Boot application
Reversing a Linked List in Java
Filed under Algorithms, Java Collections
Implement two linked list reversal algorithms in Java
The Difference Between a.getClass() and A.class in Java
Filed under Core Java
Learn the differences between calling the Object.getClass() method and using the .class syntax
Spring Boot Without A Web Server
Filed under Spring Boot
Learn multiple ways to run a Spring Boot without a web server
Checking if a Class Exists in Java
Filed under Java
Explore the nuances of using Class.forName() to check the existence of a class in the Java classpath
Passing Command Line Arguments in Gradle
Filed under Gradle
Learn how to pass command-line arguments from Gradle
How to Implement Hibernate in an AWS Lambda Function in Java
Filed under Cloud, Persistence
Look at the challenges of using any RDBMS within a Lambda, and how and when Hibernate can be useful
DAO vs Repository Patterns
Filed under Architecture, Persistence
Understand the difference between the DAO and Repository patterns with a Java example.
Guide to ArrayStoreException
Filed under Java Array
Learn the cause of ArrayStoreException, how to handle it, and best practices for avoiding it
Gradle Source Sets
Filed under Gradle
Learn a powerful way to structure source code in Gradle projects
Spring MVC Async vs Spring WebFlux
Filed under Reactive, Spring MVC
Learn about Spring Async and Spring WebFlux both theoretically and practically with a basic load test
Reading a Line at a Given Line Number From a File in Java
Filed under Java IO
Learn different ways of reading a line at a given line number inside a file
Web Server Graceful Shutdown in Spring Boot
Filed under Spring Boot
Learn how to take advantage of the new graceful shutdown feature in Spring Boot 2.3
Copy a Directory in Java
Filed under Java IO
Learn how to copy a directory using core Java features and third-party libraries
Performance Comparison of boolean[] vs BitSet
Filed under JVM
Compare BitSets and boolean[] in terms of performance in different scenarios
A Guide to async-profiler
Explore async-profiler along with various profiling techniques it offers
Difference in Used, Committed, and Max Heap Memory
Filed under JVM
Learn how adaptive sizing works and evaluate the difference between max, used, and committed sizes
A Guide to BitSet in Java
Filed under Java
Learn how we can use a Java BitSet to represent a vector of bits, gett familiar with the BitSet internals, and take a closer look at its API
Creating Docker Images with Spring Boot
Filed under Docker, Spring Boot
Learn how to create Docker images for a Spring Boot application
A Guide to False Sharing and @Contended
Filed under Java Concurrency
Learn how sometimes false sharing might cause counterproductive effects on the performance of multithreaded applications
Version Comparison in Java
Filed under Java
Explore a few ways to compare version strings in Java through various libraries
Garbage Collection and Cyclic References in Java
Filed under JVM
Learn how the JVM makes sure to collect the unreachable but cyclic object references
Memory Address of Objects in Java
Filed under JVM
Learn how to find the memory address of objects in Java
Loading JDBC Drivers
Filed under Java, Persistence
Learn some of the basic steps needed to load JDBC drivers
Measuring Object Sizes in the JVM
Filed under JVM
Learn how to measure Java object sizes with various tools such as JOL, Java Agents, and the jcmd command-line utility
Differences Between YAML and JSON
Learn about the differences between YAML and JSON through quick and practical examples
Configuring Stack Sizes in the JVM
Filed under JVM
Learn how to configure the thread stack sizes in the HotSpot JVM
When Does Java Throw the ExceptionInInitializerError?
Filed under Java
Learn what causes Java to throw an ExceptionInInitializerError using a few practical examples
Finding Unused Gradle Dependencies
Filed under Gradle
Learn how to use the Gradle Nebula Lint plugin to identify and fix unused dependencies in your project
How to Share DTO Across Microservices
Filed under Architecture
Learn ways in which DTOs are shared between microservices
Spring Boot and Caffeine Cache
Filed under Spring Boot
Learn how to use Caffeine cache with Spring Boot
The Difference between RxJava API and the Java 9 Flow API
Filed under Reactive
Learn about the Reactive Stream Specification and see a practical example of Flow API and RxJava implementations for a live video stream
Exploring JVM Tuning Flags
Filed under JVM
Learn a few ways to discover JVM tuning flags and learn how to work with them
boolean and boolean[] Memory Layout in the JVM
Filed under JVM
Learn the footprint of a boolean value in the JVM in different circumstances
View Bytecode of a Class File in Java
Filed under JVM
Explore ways to view the bytecode of a class file in Java
Using Kafka MockProducer
Learn how to use Kafka’s MockProducer to verify common producer operations
<init> and <clinit> Methods in the JVM
Filed under JVM
See how the compiler and runtime use the init and clinit methods for initialization purposes
String Concatenation with Invoke Dynamic
Filed under Java String
Learn about relatively new Java optimization: string concatenation with invokedynamic
Partial Data Update With Spring Data
Filed under Spring Data
Learn techniques and approaches to performing a partial instead of a full update
Using Kafka MockConsumer
Explore the MockConsumer, one of Kafka’s Consumer implementations
Log4j 2 Plugins
Filed under Logging
Learn how to use the Log4j 2 extension mechanism to implement custom plugins
Spring Security With Okta
Filed under Spring Security
Explore Spring Security with Okta along with a minimalistic setup of the Okta developer account
Spring Cloud Gateway WebFilter Factories
Filed under Spring Cloud
Learn about Spring Cloud Gateway’s built-in WebFilter factories and how to use them in advanced scenarios
Creating Spring Beans Through Factory Methods
Filed under Spring
Learn how to create Spring beans using both instance and static factory methods
Spring Security: Check If a User Has a Role in Java
Filed under Spring Security
Learn various ways to check if an authenticated user has a specific role
Using a List of Values in a JdbcTemplate IN Clause
Filed under Spring Data
Learn how to pass a list of values into the IN clause of a Spring JDBC template query
Oracle Connection Pooling With Spring
Filed under Spring Data
Learn how to setup connection pooling to an Oracle database with Spring Data
Custom Naming Convention with Spring Data JPA
Filed under Spring Data
Learn how to implement a custom naming strategy using Spring Data JPA
Java Map With Case-Insensitive Keys
Filed under Java Map
Learn about different Map implementations that accept all case variations of a String as the same key
Difference Between BeanFactory and ApplicationContext
Filed under Spring
Learn about the significant differences between Spring’s ApplicationContext and BeanFactory with practical examples
The Clear-Site-Data Header in Spring Security
Filed under Spring Security
Learn how to use Spring Security’s with ClearSiteDataHeaderWriter to add the HTTP Clear-Site-Data response header
Regular Expressions \s and \s+ in Java
Filed under Java
Learn about the difference between the two regular expressions through examples
Spring JdbcTemplate Unit Testing
Filed under Spring Data, Testing
Learn a few ways to write unit tests for code that uses JdbcTemplate
Guide to AtomicMarkableReference
Filed under Java Concurrency
Dive into the details of the AtomicMarkableReference class from the java.util.concurrent.atomic package
Optical Character Recognition with Tesseract
Filed under Artificial Intelligence
In this tutorial, we’ll explore Tesseract, an optical character recognition (OCR) engine, with a few examples of image-to-text processing.
Guide to the Java Authentication And Authorization Service (JAAS)
Learn about the JAAS security framework that augments the security model from code-based security to user-based security
Fast Pattern Matching of Strings Using Suffix Tree in Java
Filed under Algorithms, Java
Learn about pattern matching of strings and how we can make it faster using a suffix tree
DDD Bounded Contexts and Java Modules
Filed under Architecture, Java
Learn how to leverage Java 9 Modules while defining explicit boundaries for bounded contexts while creating a simple store application
Calling Stored Procedures from Spring Data JPA Repositories
Filed under Spring Data
Learn how to call stored procedures from Spring Data JPA Repositories
Using JSON Patch in Spring REST APIs
Filed under JSON, Spring MVC
Learn how to use the HTTP PATCH method along with the JSON Patch document format to apply partial updates to RESTful resources
Executors newCachedThreadPool() vs newFixedThreadPool()
Filed under Java Concurrency
Compare the newCachedThreadPool() and newFixedThreadPool() implementations and their use-cases
Introduction to the jcabi-aspects AOP Annotations Library
Filed under Java
Learn about the jcabi-aspects Java library, a collection of handy annotations that modify the behavior of Java application using aspect-oriented programming
Design Patterns in the Spring Framework
Filed under Architecture, Spring
Learn about four of the most common design patterns used in the Spring Framework
Guide to AVL Trees in Java
Filed under Algorithms
Learn about AVL Trees and algorithms for inserting, deleting, and searching for values
Introduction to Open Liberty
Filed under Java
Learn how to use the Open Liberty framework to create and consume a RESTful web service
Merge Cells in Excel Using Apache POI
Filed under Java IO
Learn how to merge cells in Excel with Apache POI
New Features in Java 13
Filed under Core Java
Learn about the new features and improvements introduced in JDK 13
Asynchronous Programming in Java
Filed under Java Concurrency
Learn about a few ways to achieve asynchronous programming in Java
Get String Value of Excel Cell with Apache POI
Filed under Java IO
Learn how to use Apache POI to read the cell value as a string regardless of the cell type
Efficiently Merge Sorted Java Sequences
Filed under Algorithms, Java
Learn how we can efficiently merge sorted arrays using a min-heap
Cucumber Hooks
Filed under Testing
Learn about the @Before, @BeforeStep, @AfterStep, and @After Cucumber hooks
Read Excel Cell Value Rather Than Formula With Apache POI
Filed under Java IO
Learn about different ways to read Excel cell values rather than the formula using Apache POI
Using Cookies With Selenium WebDriver in Java
Filed under Testing
Learn how to use cookies with Selenium WebDriver in Java
Convert Double to Long in Java
Filed under Java Numbers
Explore various methods to convert from double to long in Java
Sending Emails with Logback
Filed under Logging
Learn how to configure Logback for sending out an email notification for any application errors
Kruskal’s Algorithm for Spanning Trees with a Java Implementation
Filed under Algorithms
Learn how to use Kruskal’s algorithm to solve the minimum and maximum spanning tree problems
Introduction to Ninja Framework
Filed under Java
Learn about the Ninja web framework and the basic features that it provides using a simple web application
Guide to the AuthenticationManagerResolver in Spring Security
Filed under Spring Security
Learn how to use Spring Security’s AuthenticationManagerResolver for Basic and OAuth2 authentication flows
Intro to Apache Tapestry
Filed under Java
Learn about the Apache Tapestry web framework and create a simple web application using the basic features that it provides
Guide to RejectedExecutionHandler
Filed under Java Concurrency
Learn about what happens when a thread pool can’t accept any more tasks and how to control this by applying saturation policies
Java Compiler Error: illegal start of expression
Filed under Java
See examples that illustrate the main causes of the “illegal start of expression” error and how to fix it
Cucumber Data Tables
Learn how to use Cucumber data tables to include mock data in a readable manner
The Bridge Pattern in Java
Filed under Java
A guide to the bridge design pattern and its Java implementation
Debugging Java 8 Streams with IntelliJ
Filed under IDE, Java Streams
Learn about IntelliJ’s dedicated stream debugging feature with a few simple examples
Scanner nextLine() Method
Filed under Java IO
Learn about Java’s Scanner.nextLine method using some simple examples
Guide to ParameterMessageInterpolator
Filed under Jakarta EE
Learn how to use ParameterMessageInterpolator and how to configure it in Hibernate Validator
Causes and Avoidance of java.lang.VerifyError
Filed under JVM
Learn about the cause of java.lang.VerifyError errors and multiple ways to avoid it
Intro to Spring Data Geode
Filed under Spring Data
Learn how to use Spring Data Geode for the configuration and development of an Apache Geode Java client application
Best Practices for REST API Error Handling
Filed under Architecture, REST
Learn about some of the best practices for handling REST API errors, including useful approaches for providing users with additional relevant information
Transaction Propagation and Isolation in Spring @Transactional
Filed under Persistence, Spring Data
Learn about the isolation and propagation settings in Spring’s @Transactional
Transaction Support in Spring Integration
Filed under Spring Persistence
Learn about transaction support in the Spring Integration framework including how to synchronize the transaction with operations on a nontransactional resource
A Quick Guide to @DirtiesContext
Learn how to use Spring’s @DirtiesContext annotation for testing
Integrating Spring with AWS Kinesis
Learn how to integrate Spring with two AWS libraries for interacting with Kinesis Data Streams
Java FileWriter
Filed under Java IO
Learn about the Java FileWriter class with a few simple examples
Self-Hosted Monitoring for Spring Boot Applications
Filed under DevOps, Spring Boot
Use Spring Boot’s metrics actuator to create a self-hosted monitoring solution.
Spring Validation Message Interpolation
Filed under Spring
Learn how default Spring message interpolation works and how to create a custom message interpolation engine
Categories in Groovy
Filed under Groovy
Learn about the Groovy categories metaprogramming feature that can enable additional features on classes
Create a File in a Specific Directory in Java
Filed under Java IO
Learn how to create a file in a specific directory using absolute and relative file paths
Permissions-Based Access Control with Apache Shiro
Filed under Security
Learn how to implement fine-grained Permissions-Based Access Control with the Apache Shiro Java security framework
Custom Mapper with MapStruct
Filed under Java
Learn how to use custom mapper with the MapStruct library
Debugging the Spring MVC 404 “No mapping found for HTTP request” Error
Filed under Spring MVC
Learn how to fix common causes for 404 errors in Spring MVC
Spring Data Reactive Repositories with Couchbase
Filed under NoSQL, Spring Data
Learn how to configure and implement database operations in a reactive way on Couchbase using Spring Data Repositories
Guide to System.gc()
Filed under Core Java
Learn about the System.gc() method understand if there are any use cases when calling this method might be useful
Checked and Unchecked Exceptions in Java
Filed under Java
Learn the differences between Java’s checked and unchecked exception with some examples
Run a Java main Method Using Gradle
Filed under Gradle
Learn different methods of executing a Java main method using Gradle
Validating Lists in a Spring Controller
Filed under REST, Spring MVC
Learn how to validate a List of objects as a parameter to a Spring Controller
Finding the Least Common Multiple in Java
Filed under Algorithms, Java
Learn various methods to find the least common multiple of two numbers in Java
The K-Means Clustering Algorithm in Java
Filed under Artificial Intelligence
Learn about the K-Means clustering algorithm using a real-world dataset from Last.fm
Automatic Generation of the Builder Pattern with FreeBuilder
Filed under Java
Learn how to generate Java builder objects using the FreeBuilder library
Metaprogramming in Groovy
Filed under Groovy
Explore the concept of runtime and compile-time metaprogramming in Groovy
Spring WebClient Filters
Filed under HTTP Client-Side, Spring Web
Learn about WebClient filters in Spring WebFlux
Guide to @SpringBootConfiguration in Spring Boot
Filed under Spring Boot
Learn about @SpringBootConfiguration’s usage in a Spring Boot Application
The Difference between getRequestURI and getPathInfo in HttpServletRequest
Filed under Jakarta EE
Learn the difference between Java EE’s HttpServletRequest getRequestURI() and getPathInfo() methods
String toLowerCase and toUpperCase Methods in Java
Filed under Java String
Learn about Java’s String toUpperCase and toLowerCase methods
Checking if a URL Exists in Java
Filed under HTTP Client-Side
Learn how to check if a URL exists in Java using the GET and HEAD HTTP methods
@DynamicUpdate with Spring Data JPA
Filed under Spring Data
Learn how to use @DynamicUpdate with a JPA entity to ensure that Hibernate uses only the modified columns in the SQL statement for the update
The Proxy Pattern in Java
Filed under Java
A guide to the Proxy design pattern and its Java implementation
Lossy Conversion in Java
Filed under Java
Learn about lossy conversion in Java and some handy conversion techniques to avoid this error
Remote Code Execution with XStream
Learn how to prevent a remote code execution attack on an application that uses XStream to read XML
Compare Two JSON Objects with Jackson
Learn how to use Jackson to compare two JSON objects using the built-in comparator and a custom comparator
A Guide to Apache Mesos
Filed under Architecture
Learn how Apache Mesos addresses problems of resource allocation within applications deployed on the same cluster
Understanding getBean() in Spring
Filed under Spring
Learn about the different variants of Spring’s BeanFactory.getBean() method for retrieving a bean instance from the Spring container
Converting Iterator to List
Filed under Java Collections
Explore the various methods for converting an Iterator to a List in Java.
Google AutoService
Filed under Java
Learn how to use Google’s AutoService to generate Java Service Provider Interface (SPI) configuration files
Jest – Elasticsearch Java Client
Learn how to use the Jest HTTP Java client for Elasticsearch
Integrating Groovy into Java Applications
Filed under Groovy
Learn about the latest techniques to integrate Groovy into a Java application
Decode an OkHttp JSON Response
Filed under HTTP Client-Side, JSON
Learn several techniques for decoding a JSON OkHttp response
Using SpringJUnit4ClassRunner with Parameterized
Learn how to use the Parameterized JUnit test runner with a Spring integration test
How to Delay Code Execution in Java
Filed under Java Concurrency
Learn different ways to implement delays in Java
String API Updates in Java 12
Filed under Java String
Explore the new Java String APIs with examples
Template Engines in Groovy
Filed under Groovy
Learn how to handle dynamic text using Groovy template engines
Tagging and Filtering JUnit Tests
Filed under Testing
Learn about a few filtering techniques for JUnit 5 test cases
Guide to Quarkus
Learn about Quarkus and if it’s an alternative for bringing Java more effectively to the cloud
Run a Java Application from the Command Line
Learn how to create and run a JAR application with or without command-line arguments
Convert Time to Milliseconds in Java
Filed under Java Dates
Learn multiple ways of converting Java time objects into Unix-epoch milliseconds
Check If a String Contains a Substring
Filed under Java String
Explore various ways to search for a substring in a String with performance benchmarks
Maps in Groovy
Filed under Groovy
Explore the core operations of Maps in Groovy
Groovy def Keyword
Filed under Groovy
Learn about the def keyword in Groovy
Spring Data JPA Repository Populators
Filed under Spring Data
Learn how to use Spring JPA repository populators to load data from JSON or XML files for testing
Copying a HashMap in Java
Filed under Java Map
Learn various techniques for making shallow and deep copies of Java’s HashMap
Guide to Spring Cloud Kubernetes
Filed under DevOps, Spring Cloud
Learn how to install Minikube, setup, and deploy Spring Boot applications to a local Kubernetes environment.
SLF4J Warning: Class Path Contains Multiple SLF4J Bindings
Filed under Logging
Learn about the SLF4J warning “Class path contains multiple SLF4J bindings” and how to fix it
Creating New APIs and Views in JHipster
Filed under Spring Boot
Learn how to create a new API inside a JHipster application and integrate that API into the front-end display
Difference Between save() and saveAndFlush() in Spring Data JPA
Filed under Spring Data
Learn about the difference between the save() and saveAndFlush() methods in Spring Data JPA
Differences Between JAR and WAR Packaging
Filed under Java
Learn about the differences between JAR and WAR packaging in Java
Map of Primitives in Java
Filed under Java Map
Learn how to create a Map of Java primitives using popular third-party libraries
Converting Between LocalDate and XMLGregorianCalendar
Filed under Java Dates
Learn how to convert between Java’s LocalDate and XMLGregorianCalendar
Spring Boot Reactor Netty Configuration
Filed under Reactive, Spring Boot
Learn about different configuration options for a Reactor Netty server in a Spring Boot application
A Java Web Application Without a web.xml
Filed under Jakarta EE
Learn how to use the Java Servlet 3.0 annotations instead of a web.xml file
RxJava Hooks
Filed under Reactive
Learn about the various RxJava lifecycle hooks and how can we implement them
Serializing and Deserializing a List with Gson
Filed under JSON
Learn a few advanced serialization and deserialization cases for List using Google’s Gson library
Eclipse Error: web.xml is missing and failOnMissingWebXml is set to true
Filed under IDE, Jakarta EE
Learn how to fix the eclipse error: web.xml is missing and failOnMissingWebXml is set to true
Guide to the JDBC ResultSet Interface
Filed under Persistence
Learn how to use the JDBC ResultSet API for retrieving and updating data
Introduction to the Null Object Pattern
Filed under Java
Learn about the Null Object Pattern and how to implement it in Java
Time Comparison of Arrays.sort(Object[]) and Arrays.sort(int[])
Filed under Java Array
Compare the performance of Arrays.sort() for Objects and primitives
Creating New Roles and Authorities in JHipster
Filed under Security, Spring Boot
Learn how to create a new role that we can use to provide additional privileges to a user in a JHipster application
The Adapter Pattern in Java
Filed under Java
Understand the Adapter Design Pattern with a practical Java implementation
Testing Web APIs with Postman Collections
Filed under Testing
Learn how to create a Postman Collection that can test a REST API
Performance Comparison of Primitive Lists in Java
Filed under Java Collections
Compare the performance of some popular primitive list libraries in Java
Multi-Release Jar Files
Filed under Java
Learn about Java 9’s Multi-Release JAR files using a simple example
Working With Maps Using Streams
Filed under Java Map, Java Streams
Learn how to combine Java Maps and Streams
Creating a SOAP Web Service with Spring
Filed under Spring Boot
Learn how to create a SOAP-based web service using Spring Boot
Handle Security in Zuul, with OAuth2 and JWT
Filed under Spring Security
Learn about how you can use the Zuul edge service in conjunction with OAuth and JWTs to secure your web services
Reading a File in Groovy
Filed under Groovy
Learn various ways to read text and binary files in Groovy
Guide to Creating and Running a Jar File in Java
Learn different ways to package and run a simple Java application as a jar
Marker Interfaces in Java
Filed under Core Java
Learn about Java marker interfaces and how they compare to typical interfaces and annotations
Guice vs Spring – Dependency Injection
Filed under Spring
Learn about the similarities and differences between Guice and Spring for dependency injection
List of Primitive Integer Values in Java
Filed under Java Collections
Learn how to create a List of primitive integers using core Java and external libraries
Spring Data JPA Query by Example
Filed under Spring Data
Learn how to use Spring Data’s Query by Example API
Check If a String Contains Multiple Keywords in Java
Filed under Java String
Learn about various methods to determine if a Java String contains multiple keywords
OpenJDK Project Loom
Filed under Core Java, Java Concurrency
Learn about Project Loom’s attempt to introduce a lightweight concurrency construct to Java
Delete the Contents of a File in Java
Filed under Java IO
Learn various ways to remove the contents of a file without deleting the file.
Guide to JUnit 5 Parameterized Tests
Filed under Testing
Learn how to simplify test coverage in JUnit 5 with parameterized tests
Implementing Simple State Machines with Java Enums
Filed under Algorithms
Learn how to use Java Enums to build simple state machines
Converting Between LocalDate and SQL Date
Filed under Java Dates
Learn how to convert between java.sql.Date and java.time.LocalDate
Deserialize Immutable Objects with Jackson
Learn how to use Jackson to deserialize immutable objects
Java instanceof Operator
Filed under Core Java
Learn about the instanceof operator in Java
Monitoring Java Applications with Flight Recorder
Filed under DevOps
Learn about the Java Flight Recorder which collects information about events in the JVM during the execution of a Java application
Check if a String Is a Pangram in Java
Filed under Java String
Learn how to determine if a Java String contains all of the letters in the alphabet
Java ArrayList vs Vector
Filed under Java Collections
Learn about the differences between the Java ArrayList and Vector classes
Immutable Set in Java
Filed under Java Collections
Learn about different ways to create an immutable set in Java
Java 11 Nest Based Access Control
Filed under Java
Learn about Java nested type access rules and the changes made in Java 11
Differences Between HashMap and Hashtable in Java
Filed under Java Map
Learn about the differences between Java’s HashMap and Hashtable collections
Introduction to JVM Code Cache
Filed under JVM
Learn about the JVM’s code cache memory usage and tuning settings
Debugging Spring Applications
Learn how to debug Spring applications for various application servers and IDEs
Working with Primitive Values in Gson
Filed under JSON
Learn how Google’s Gson library serializes and deserializes Java primitive types
Sorting Arrays in Java
Filed under Java Array
Learn how to sort arrays or primitive types and objects in ascending and descending order
Java 11 String API Additions
Filed under Java String
Learn about additions to the String API in Java 11.
Programmatically Restarting a Spring Boot Application
Filed under Spring Boot
Learn a few ways to restart a Spring Boot application with Java
Java 11 Local Variable Syntax for Lambda Parameters
Filed under Java
Learn how to use var syntax with lambda expressions in Java 11
Using c3p0 with Hibernate
Filed under Persistence
Learn how to add c3p0 to a Hibernate application and configure some common properties
Java 11 Single File Source Code
Filed under Java
Learn about the new Java 11 feature of single-file source-code programs
Java Stream Filter with Lambda Expression
Filed under Java Streams
Learn how to use lambda expressions with Stream.filter() and handle checked exceptions
Formatting Output with printf() in Java
Filed under Core Java
Learn how to format output using Java’s PrintStream.printf() method
Ways to Iterate Over a List in Java
Filed under Java Collections
Review different ways to iterate through a List in Java
Java equals() and hashCode() Contracts
Filed under Core Java
Learn about the contracts that equals() and hasCode() need to fulfill and the relationship between the two methods
Java CyclicBarrier vs CountDownLatch
Filed under Java Concurrency
Compare and contrast the Java CyclicBarrier and CountDownLatch synchronization utilities
The Decorator Pattern in Java
Filed under Java
A guide to the decorator design pattern and its Java implementation
Java Compiler Error: “class, interface, or enum expected”
Filed under Java
Learn about the “class, interface, or enum expected” Java compiler error and how to fix it
Adding a Newline Character to a String in Java
Filed under Java String
Learn about newline characters in Java for text output and HTML
Many-To-Many Relationship in JPA
Filed under JPA
Learn how to model a many-to-many relationship in Java using JPA
How to Replace Many if Statements in Java
Filed under Java
Learn various ways of replacing complex nested if statements
Convert Latitude and Longitude to a 2D Point in Java
Filed under Algorithms, Java
Learn how to use the Mercator projection to convert latitude and longitude coordinates onto a 2D surface
Rate Limiting in Spring Cloud Netflix Zuul
Filed under Spring Cloud
Learn how to rate limit requests using Spring Cloud Zuul
Intro to Apache Storm
Filed under Architecture
Learn how to use Apache Storm to process streams of data
Custom Types in Hibernate and the @Type Annotation
Filed under Persistence
Learn how to use custom Java classes to extend basic type mapping in Hibernate
Concrete Class in Java
Filed under Core Java
Learn about java concrete classes and how they are different than interfaces and abstract classes
Maven Error “JAVA_HOME should point to a JDK not a JRE”
Filed under Maven
Learn about the root cause of the Maven error ‘JAVA_HOME should point to a JDK not a JRE’ and how to resolve it
Multi-Module Project with Maven
Filed under Maven
Learn about the benefits of using a Maven multi-module project and walk through the setup of a simple example
Converting Between Byte Arrays and Hexadecimal Strings in Java
Filed under Java Array
Learn how to convert between hexadecimal strings and byte arrays using the JDK and other popular libraries.
Setting the Java Version in Maven
Learn about different ways to set the Java version for your Maven project
Guide to DateTimeFormatter
Filed under Java Dates
Learn how to use the Java 8 DateTimeFormatter class to format and parse dates and times
Guide to Java OutputStream
Filed under Java IO
Learn about the Java OutputStream’s interfaces and common methods
Merging Two Maps with Java 8
Filed under Java Map
Learn different techniques for merging maps in Java 8
Online Java Compilers
Learn about the main features of the top Java online compilers
Guide to Passay
Filed under Security
Learn how to use the Passay library for password validation and generation
String Performance Hints
Filed under Java String
Learn about the performance aspects of the Java String API
Introduction to Protonpack
Filed under Java Streams
Learn about the Java Stream API utility classes provided by the Protonpack library
Warning: “The type MockitoJUnitRunner is deprecated”
Filed under Testing
Learn how to handle the MockitoJUnitRunner class deprecation warning.
Sort a HashMap in Java
Filed under Java Map
Learn how to sort HashMap entries by their key or value
Different Ways to Capture Java Heap Dumps
Filed under JVM
Learn multiple ways to capture a heap dump in Java
Round Up to the Nearest Hundred in Java
Filed under Algorithms
Learn how to round a number up to the nearest hundred in Java
Get the Key for a Value from a Java Map
Filed under Java Map
Learn how to retrieve a key from a Java Map given the value
Permgen vs Metaspace in Java
Filed under JVM
Learn about the differences between the PermGen and Metaspace memory regions in Java
Spring Security for Spring Boot Integration Tests
Filed under Spring Boot, Spring Security, Testing
Learn how to execute Spring Security enabled integration tests
Time Complexity of Java Collections
Filed under Java Collections
Learn about the time complexity for common operations on Java collections
Set a Response Body in JAX-RS
Filed under Jakarta EE, REST
Learn how to set the JAX-RS response body for various media types
Spring Application Context Events
Filed under Spring
Learn about the built-in events for the Spring application context
Spring Data Composable Repositories
Filed under Spring Data
Learn how to use multiple fragments to implement a Spring Data repository
Performance of contains() in a HashSet vs ArrayList
Filed under Java Collections
Learn about the performance differences between ArrayList.contains() and HashSet.contains()
Set the Time Zone of a Date in Java
Filed under Java Dates
Learn how to set the time zone of a date in Java 7, Java 8 and Joda-Time
java.util.Date vs java.sql.Date
Filed under Java Dates
Learn about the differences between java.util.Date and java.sql.Date.
Creating a Custom Log4j2 Appender
Filed under Logging
Learn how to create a custom logging appender for Log4j2.
Spring @Primary Annotation
Filed under Spring
Learn how to use Spring’s @Primary annotation to give preference to beans when autowiring
A Guide to Eclipse JNoSQL
Filed under NoSQL, Persistence
Learn how to use Eclipse JNoSQL to work with NoSQL databases
Build a Jar with Maven and Ignore the Test Results
Filed under Maven
Learn different ways to build a jar with maven and ignore the test results
Uploading MultipartFile with Spring RestTemplate
Filed under HTTP Client-Side, Spring Web
Learn how to upload files using Spring’s RestTemplate.
@Component vs @Repository and @Service in Spring
Filed under Spring
Learn about the differences between the @Component, @Repository and @Service annotations and when to use them.
Building a Microservice with Apache Meecrowave
Filed under REST
Learn how to use Apache Meecrowave to create a microservice
Introduction to GWT
Filed under Java
Learn how to create a simple web application using GWT.
Spring Boot Console Application
Filed under Spring Boot
Learn how to create a Spring Boot console application
Converting Between Roman and Arabic Numerals in Java
Filed under Algorithms, Java Numbers
Learn how to convert between Roman and Arabic numerals using Java
Get and Post Lists of Objects with RestTemplate
Filed under HTTP Client-Side, Spring Web
Learn how to GET and POST lists of objects using Spring’s RestTemplate
Jakarta EE Servlet Exception Handling
Filed under Jakarta EE
Learn how to handle exceptions in a Jakarta EE Servlet application.
Spring – Injecting Collections
Filed under Spring
Learn how to inject different types of Java collections using the Spring framework.
The Thread.join() Method in Java
Filed under Java Concurrency
Learn how to use the Thread.join() methods for thread synchronization.
Guide to the super Java Keyword
Filed under Core Java
Learn how to use Java’s super keyword to reference the parent class.
Spring RequestMapping
Filed under Spring MVC
Spring @RequestMapping – Basic Example, @RequestParam, @PathVariable, Header mapping
Baeldung on Linux
- All
- Files (101)
- Scripting (95)
- Administration (83)
- File Editing (43)
- Filesystems (28)
- Installation (24)
- Processes (23)
- File Searching (22)
- Web (14)
- Networking (13)
- File Viewing (10)
- Security (9)
- Search (6)
- Docker (6)
- File Compression (4)
- File Permissions (3)
- File Conversion (3)
Sending Files Over Samba With Command Line
Filed under Files
Learn how to send files over Samba via the command line (CLI) using smbclient and mount with CIFS commands.
How to Extract Value From XML Tags in Shell
Filed under Scripting
Learn how to process an XML document to extract tag values and attributes using xmllint, starletxml, and perl.
How to Use Shell Functions in Awk Scripts
Filed under Scripting
Learn how to use shell functions inside Awk scripts by sourcing shell scripts, writing inline shell functions, and using user-defined Awk functions.
Difference Between BusyBox and Alpine Docker Images
Filed under Docker
Learn several differences between the BusyBox and Alpine Linux Docker images.
How to Quickly Trim Audio and Video in Linux
Filed under File Editing
Learn about different GUI utilities to trim audio and video files in Linux.
How to Install geckodriver in Linux
Filed under Installation
Learn several ways of installing geckodriver on Linux.
How to Search Through the Terminal Output
Learn a few ways of searching through the terminal output and terminal history.
How to Install Packages Without Root Privileges
Filed under Installation
Learn how to download and install packages to a custom non-root directory.
How to Strip Numeric Characters From a String in Shell
Filed under Scripting
Explore different methods to strip numeric characters from a string using various shell scripting tools
How to Setup WiFi Hotspot in Linux
Filed under Networking
Learn how to create a WiFi hotspot access point in Linux using the Network Manager utility.
How to Rename Files With a Quote in the Filename
Filed under Files
Learn how to rename files with a quote in their filename using the mv and rename commands.
How to Stitch Videos Horizontally With FFmpeg
Filed under File Editing
Learn how to join two videos side-by-side into a unified video using FFmpeg’s hstack and overlay filters.
How to Install and Configure Wine on Linux
Filed under Administration, Installation
Learn how Wine works, how to install the latest stable version, and how to configure audio, graphics, and fonts.
Showing a Character at a Specific Position in a File in Linux
Filed under File Viewing
Learn how to show a character at a specific position in a file using command-line utilities such as head, tail, sed, awk, od, cut, and read.
How to Get the Current Date in awk
Filed under Scripting
Learn how to get the current date in awk and use it for date-time logging, data analysis, and data filtering.
How to Display a Real-Time Clock in Shell Prompt?
Filed under Administration
Learn how to customize a shell to display a live clock.
How to Download Multiple Files With cURL Using Brace Syntax
Filed under Web
Learn how to download multiple files with a single curl command using brace syntax.
How to Remove the Last Occurence of a Pattern in a File
Filed under File Editing
Learn how to remove the last occurrence of a pattern in a file using command-line utilities, such as sed, awk, and tac
How to Set Icon Theme for GTK Applications
Filed under Administration, Installation
Learn how to set GTK themes manually through configuration files and how to set the icon for the GNOME desktop and install custom emblems.
How to Take the Absolute Value of a Number in Awk
Filed under Files
Learn various methods of getting the absolute value of numbers in Awk.
How to Add Objects Into JSON Array Using jq
Filed under File Editing
Explore various ways we can add an object to a JSON array using jq.
Using Multiple Delimiters in Awk
Learn how to use multiple delimiters in Awk to separate fields in an input record using the split(), match(), and substr() functions.
Sorting Docker Images by Size Using the docker images Command
Filed under Docker
Learn to sort Docker images using the docker images command with multiple command-line utilities.
How to Normalize Audio Files in Linux
Filed under File Editing
Explore various command-line and GUI utilities to normalize audio files.
How to Increment a Number in a Matched Pattern
Filed under Scripting
Learn how to increment a number in a matched pattern using different command-line utilities, such as awk, sed, expr, bc, grep, and cut.
How to Interpolate Frames Using FFmpeg
Filed under File Editing
Learn about two frame interpolation filters offered by FFmpeg: tblend and minterpolate
Assigning the Current Git Branch Name to a Variable in a Shell Script
Filed under Scripting
Learn how to get the current branch name and assign it to a variable using various git sub-commands.
Zsh Configuration Files
Filed under Administration
Explore the various configuration files for Zsh, such as .zshenv, .zprofile, and .zshrc.
How to Replicate Packages Across Linux Systems
Filed under Administration, Installation
Explore how to replicate packages across major Linux distributions.
How to List Files Sorted by the Number of Lines They Contain
Filed under Files
Learn how to use wc, sort, awk, find, and xargs to list the files sorted by the number of lines they contain.
Finding Directories Not Containing a Specific File in Linux
Filed under File Searching
Explore multiple approaches for finding directories not containing a specific file in Linux.
How to Sort Bash Arrays
Filed under Scripting
Learn how to sort number arrays as well as string arrays in Bash.
How to Convert Audio File Format From M4A to MP3 in Linux
Filed under File Conversion
Learn how to convert an M4A audio format to MP3 using FFmpeg, Libav, faad2, lame, SoundConverter, and WinFF.
How to Annotate Image Files in Linux
Filed under File Editing
Learn how to annotate images in Linux using ImageMagick, Shutter, and Pinta.
How to Redirect the Contents of a File to echo
Filed under File Viewing
Learn multiple ways to redirect the contents of a file to the echo command.
How to Run Variable Content as a Command in Bash
Filed under Scripting
Learn how to run the content of a variable as a command in Bash using command-line utilities such as eval, sed, and awk.
Generating a List of Dates in a Range in Bash
Filed under Scripting
Learn how to generate a list of dates in a range in Bash using different command-line utilities.
Lossless Conversion of MKV to MP4
Filed under File Conversion
Dive into the conversion process of MKV (Matroska Video) to MP4 (MPEG-4 Part 14) with no or negligible loss of quality.
How to Remove Personal Package Archives (PPAs)
Filed under Administration
Learn how to manually remove PPAs from Ubuntu-based distributions and several utilities to delete the PPAs quickly and easily.
Format a USB Drive in Linux
Filed under Administration, Filesystems
Learn how to create a partition table on a USB disk and use a wide range of tools for different file systems to format the USB drive partition.
How to Convert a String to Hexadecimal on the Command Line in Linux
Filed under Scripting
Learn several techniques to convert a string to hexadecimal using command-line utilities in Linux.
sudo Access for a File Inside Vi/Vim
Filed under File Editing, Security
Learn how to save a file as sudo without leaving the Vim editor.
Creating GIF of Screen Recording on Linux
Filed under Files
Explore how to record screens on both X11 and Wayland, convert the resulting video to GIF, and optimize it further.
Guide to Personal Package Archives
Filed under Administration, Installation
Learn about PPAs, their advantages over the official package repository, and the risks involved.
How to Check Monitor Names in Linux
Filed under Administration
Learn how we can display a monitor’s vendor name, model name, and interface name.
Guide to Incremental Search in Vim
Filed under File Searching
Explore the incremental search feature in Vim along with the search highlight feature.
How to Create a Bootable USB Drive in Linux
Filed under Administration, Installation
Learn how to create a bootable USB disk in Linux using the dd utility and the Ventoy program.
How to Grep From the End of a File to the Beginning
Filed under File Searching
Explore multiple approaches to searching a file from its end.
How to Store Standard Error Messages in a Linux Variable
Filed under Scripting
Learn multiple ways to store standard error text in a Linux variable.
How to Fill and Sign PDFs in Linux
Filed under Files
Learn how to fill PDF forms and add a signature image to PDF files using Xournal++, Firefox, and LibreOffice Draw.
Bidirectional Clipboard Piping in Bash
Filed under Administration
Learn how to use the system clipboard using the command line.
How to Append Text at the Beginning of a File in Linux
Filed under File Editing
Learn how to append text at the beginning of a file using cat, awk, tee, and sed.
The $TERM Environment Variable
Filed under Administration, Scripting
Learn about the $TERM environment variable, which defines the capabilities of a terminal.
Guide to Linux CLI Calendar
Filed under Administration
Learn about Linux’s cal and ncal commands to show the calendar in the terminal.
Differences Between GTK+ and Qt Applications
Filed under Administration, Installation
Explore the differences between GTK+ and Qt-based applications and learn how these two popular GUI toolkits differ in architecture, licensing model, implementation language, and platform support
Adjust GRUB Menu Font Size
Filed under Administration
Learn how to change the font and font size of the GRUB menu.
How to Match a Pattern “N” Times Using sed
Filed under File Editing, File Searching
Learn how to match a pattern “N” times using sed for single-line and multi-line inputs.
How to Find “n” Consecutive Characters in Text
Filed under File Searching
Learn the basic differences between the BRE and ERE syntax and explore using grep and egrep to find the words that contain n consecutive characters.
Searching for Patterns in Binary Files
Filed under File Searching
Explore several text-based and GUI-based tools to search for hexadecimal patterns in binary files.
How to Split a Parameter by a Character Using awk
Explore multiple strategies for splitting a parameter (input record) by a character using awk.
Joining Lines Without Introducing a Space in Vim
Filed under File Editing
Learn multiple ways to join lines in a text file without introducing a space.
Understanding the dm-0 Device in Linux
Filed under Administration, Filesystems
Explore what the dm-0 device is, its purpose, and how it’s related to LVM (Logical Volume Manager).
Check Permissions of a Mounted Filesystem in Shell
Filed under Filesystems, Security
Explore various methods to determine if a filesystem is read-only or read-write.
Listing Open Sockets Inside a Running Docker Container in Linux
Filed under Docker, Networking
Explore different methods to list open sockets inside a running Docker container in Linux.
Close File Descriptors in Bash
Learn what file descriptors and close file descriptors are and how to use them.
How to Find the Drivers Associated With a Device on Linux
Filed under Administration, Installation
Explore several techniques to identify the drivers associated with a device.
Printing Specified Lines From a File
Filed under File Viewing
Learn how to extract specific lines from a file by line numbers using sed and awk.
How to Disable CPU Cores in Linux
Filed under Administration
Learn how to disable CPU cores temporarily and on boot and how to restrict a process to certain cores.
How to Generate a Thumbnails Gallery of a Video
Learn a couple of methods to generate a gallery of thumbnails from a video.
Replace the First n Matched Instances in a File
Filed under File Editing
Learn how to replace the first n pattern occurrences in a file using sed and awk.
How To Stream and Watch Remote Videos in Linux
Filed under Web
Explore some command-line tools that allow us to stream and watch remote videos directly in Linux.
Running fsck on a Mounted Partition
Filed under Administration, Filesystems
Explore the possibility of running fsck on a mounted partition and the potential risks and issues associated with it.
Quickly Formatting an ext4 Filesystem
Filed under Filesystems
Learn various ways to convert and quickly format a partition as ext4.
How to Pass an Environment Variable in Kubernetes Deployment
Filed under Administration
Learn how to pass environment variables to Kubernetes deployment.
Upgrading an Older Vim Script Code to Vim 9 Script
Filed under File Editing
Learn how Vim 9 Script format can bring improved features and enhancements to our existing Vim Script code.
Understanding Labels and Annotations in Kubernetes
Filed under Administration
Learn important differences between labels and annotations in terms of structure, accessibility, and direct integration with controllers.
How to Check Whether a Machine Is Booted Using the UEFI
Filed under Administration
Learn several tools and techniques available to check for the boot method in Linux.
Sending Signals to a Process Running in a Docker Container
Learn three ways of sending a signal to a process running in a Docker container.
How to Setup a Development Environment for Shell Scripting in Linux
Filed under Administration, Scripting
Learn how to create a development environment for shell scripting using a couple of plugins for autocompletion and linting the shell script to Vim and NeoVim.
How to Operate on Files Listed in a File
Learn to use various techniques to operate on files listed in a file.
Installing More Recent Versions of a Software on Debian
Filed under Installation
Learn how to install a more recent version of software than is available on the Debian package repository.
Connect to a Hidden Wireless Network Using Network Manager
Filed under Networking
Learn how to connect to a hidden wireless network using the nmcli and nmtui utilities.
Use of BEGIN and END Rules in Awk
Learn the use of awk’s BEGIN and END blocks to solve several interesting use cases, including report generation, line deduplication, sorting, data validation, and data conversion.
How to Quickly Render Basic HTML in the Command Line
Filed under Web
Learn how to render and view HTML pages using lynx, w3m, and html2text.
Guide to Multiplying Columns Using awk
Filed under Scripting
Learn how to multiply columns using awk where columns are from the same file or different files.
How to Use Dark Theme for All GTK Applications
Filed under Administration
Learn how to enable dark themes for all GTK applications on a Linux desktop
Why Is Linux a Monolithic Kernel?
Filed under Administration
Explore the different types of kernel architectures, specifically focusing on monolithic, microkernel, and hybrid kernels
How to Automatically Switch to the Git Directory After Cloning
Filed under Installation, Scripting
Learn how to automatically cd into a directory created by git clone.
How to cat the Contents of Files Found Using find Into a Single File
Filed under Files
Learn several ways to cat the contents of the files (found using find) to a single destination file.
How to Embed a Shell Command Into a sed Expression
Filed under Scripting
Explore several strategies to embed a shell command into a sed expression, such as the substitution flag, command substitution, and parameter expansion.
How to Auto Delete Files Older Than N Days
Filed under File Searching
Learn how to do file cleanup activity by removing files older than N days and how to automate the process.
How to Test for POSIX Compliance of Shell Scripts
Filed under Administration
Learn about different POSIX-compliant shells and how to use the ShellCheck utility to check for the compliance of scripts.
Add Syntax Highlighting and Additional Features to the Shell Command-Line
Filed under Administration, Installation
Learn how to add autocompletion, suggestions, and syntax highlighting to Bash and Zsh.
How to Remove an Element From an Array Completely in Bash
Filed under Scripting
Learn how to remove an element from a Bash array using positional offsets, selective copying, and utilities such as set, shift, and tac.
Guide to Converting Timestamps in a Column to a Date
Filed under Scripting
Learn how to convert timestamps in a column to a comprehensible date format
Directing the Output of wget to /dev/null in cron
Filed under Administration, Web
Learn the significance of disabling the output of the wget command in cron
Open Large Files With Good Performance in Vim
Filed under File Editing
Learn how to open and edit large files in Vim in a performant way using built-in options and plugins
What’s the Meaning of $! in Bash Scripting
Learn the meaning of the special shell variable $!.
Guide to Using sed to Remove Multi-Line Text Blocks
Filed under File Editing
Learn how to use GNU sed to remove multi-line text blocks in different scenarios.
Extract Text Between Two Specific Characters in the Command Line
Learn how to extract text between two specific characters using grep, sed, and awk through examples.
How to Enable/Disable Touchpad in Linux
Filed under Administration
Learn how to disable and enable the touchpad and trackpad from the command line in an X11 or Wayland environment
Changing the Colors of Files and Directories in ls Output
Filed under Files
Explore how to change the color of files and directories in the ls command.
Finding Duplicate Files With the Same Name
Filed under File Searching
Learn how to find files with duplicate names in any letter case using the find, ls, sed, awk, grep, and cut commands.
How to List Files Not Matching a Given String in the Filename
Filed under File Searching
Learn how to list files whose filenames don’t match a given pattern.
How to Check Whether Date Argument Is in the yyyy-mm-dd Format
Filed under Scripting
Explore different ways of checking whether a date argument is in the “yyyy-mm-dd” format.
Mounting APFS Partition on Linux
Filed under Filesystems
Learn how to mount an Apple File System (APFS) partition on a Linux machine.
Avoiding the nohup Command’s Input/Output Message
Filed under Scripting
Learn how nohup works and explore two methods to avoid generating nohup.out and the associated terminal messages.
Getting Network Interfaces in Ansible
Filed under Administration, Networking
Explore various approaches for gathering network interface data using Ansible.
Check Whether a Container Is Running With docker-compose
Filed under Docker
Learn how to use the docker-compose command to check whether a container is running and how to make such checks more effective by adding a health check for the services.
How to Configure Multilingual Fonts on Linux
Filed under Administration
Learn how to install and configure multilingual fonts using fontconfig.
How to Find Lines Exceeding a Certain Length in a File
Filed under File Searching
Learn three ways to find lines exceeding a specific length in a file.
How to Quickly Install Multiple Fonts in Linux
Filed under Installation
Learn how to install fonts for single and multiple users using the command-line and the Font Manager GUI utility.
Getting the Kernel Command-Line Parameters
Filed under Administration
Explore how to get the kernel command-line parameters in the current running Linux system
Guide to Passing Bash Variables to jq
Learn how to make a jq program reusable by passing Bash variables to it.
Print the Count of Lines Together With a Command’s Output
Filed under Scripting
Learn three ways to print a command’s output and the total number of lines in one shot.
How to Run the time Command on Multiple Commands
Filed under Scripting
Learn how to use a single line of code to run the time command on multiple commands.
How to Get Octal File Permissions From the Command Line
Filed under File Permissions
Learn how to get the octal permissions of files in Linux using the stat, find, sed, awk, and exa commands.
Conversion of a Disk from MBR to GPT with UEFI
Filed under Administration, Filesystems
Learn how to convert an MBR disk to GPT using tools like gdisk and mkfs.
Using a Specific DNS for a Specific Domain in Linux
Filed under Networking, Web
Learn different ways to use specific DNS for certain domains or certain applications.
How to Get the HTTP Status of a Site Using cURL
Filed under Web
Learn how to connect to a site using cURL and retrieve the HTTP response status.
How to Rename Multiple Files in Linux by Removing the Extension
Filed under Files
Learn how to rename multiple files in Linux using the mv, rename, and mmv commands.
Finding Unique Text Between Two Files
Filed under Files
Learn how to find unique text between two files in Linux using a variety of methods, including command line tools like comm, diff, grep, and awk.
Guide to Passing Parameters to an Awk Script
Filed under Scripting
Learn how to write dynamic awk scripts by passing parameters.
How to Setup Search Indexing for an Entire Linux System
Learn about using find, locate and recoll to find files
Enable Confirmation Alert When Removing Files and Directories
Filed under Files
Learn what to expect when running various file and directory removal commands and how to enable confirmation alerts
How to Operate as Root in GUI
Filed under Administration
Learn the various ways to run GUI applications as root under Linux using gksu, sudo, and PAM.
How to Find All Files Containing a Specific Text Pattern
Filed under File Searching
Learn how to find all files containing a specific text pattern using Linux utilities like find, grep, and a few other alternatives.
Printing awk Output in the Same Line
Filed under Scripting
Learn three approaches for awk to print records in the same line with examples.
How to grep Without Leading Whitespaces
Filed under File Searching
Learn how to use sed, awk, and shell parameter expansion to grep without leading whitespace.
How to Filter strace’s Output Using grep
Filed under Administration, Processes, Scripting
Learn how to use the grep command to filter strace’s output.
Guide to Removing Trailing Newline From grep Output
Filed under Files
Learn multiple strategies to match a pattern using the grep command and remove the trailing newline from the output.
Exclusion of a Specific Directory While Using ls Command
Filed under Files
Explore three different methods for excluding a specific directory from the ls command’s output.
Replacing Specific Line With a String Variable in Shell
Filed under File Editing, Scripting
Learn how to use sed and awk to replace specific lines with a string variable
Matching Multiple Strings Using Only One grep
Filed under Files
Learn how to search multiple strings using only one grep process
Executing Multiple Commands in Find -exec
Filed under Scripting
Learn three ways of executing a sequence of commands on the output of the find command
Returning Filenames Without Extension Using find
Filed under Files
Learn how to tell find to output only filenames without extensions.
Guide to Downloading URLs Listed in a File Using cURL
Filed under Web
Learn a few ways to use the curl and wget commands for downloading a set of files listed in a file
How to Process a Bash Variable With sed
Filed under Scripting
Learn three approaches to using an external command to process shell variables
How to Sum Up the Size of Files Listed
Filed under Files
Learn how to sum up the size of listed files using the ls and find commands
How to Split a Text File Based on a Regular Expression
Filed under File Editing
Learn how to split a text file based on a regular expression with the help of a few popular text-processing utilities.
How to Install and Set Up Headless Linux
Filed under Administration, Installation
Learn why we might need to use headless Linux and then dive into the installation process.
How to Monitor DHCP Client Activity in Linux
Filed under Networking
Learn a few methods to monitor the DHCP client activity in Linux.
Find Statistics on File Types Recursively in a Directory
Filed under Files
Learn two methods to recursively find statistics on file types in a directory
How to Detect RAID Information in Linux
Filed under Filesystems
Learn how to detect the RAID information, such as the name and the model number, from the Linux command line.
LVM Dangers and Caveats
Filed under Filesystems
Understand the risks and problems associated with using Logical Volume Management (LVM).
What Is an ELF File?
Filed under Administration, Files
Learn about an Executable and Linkable Format (ELF) file and its structure.
Prevent Specific Package Update in Linux
Filed under Administration, Installation
Learn the various ways to prevent a package from being updated in Ubuntu as well as RHEL and Fedora.
How to Use which on an Aliased Command
Filed under Administration, Scripting
Learn how to get an executable’s path when it’s in an alias
Command-Line Tools for Printing a Blank Line Between Lines of a Text File
Filed under File Viewing
Learn how to output a blank line after each line in the file using Linux command-line tools.
Implementing a Command Line Progress Bar
Filed under Scripting
Learn how to implement a customizable, reusable command line progress bar using shell script.
Setup a Ruler on a Specific Column in Vim
Filed under File Editing
Learn how to set column rulers in the Vim editor and customize them.
How to Make Output Overwrite the Same Line in a Terminal
Filed under Scripting
Explore how to overwrite an output line using the echo and printf commands.
Checking the Number of Open HTTP Connections With Netstat
Filed under Networking, Web
Learn about HTTP and how to use netstat to check the number of open HTTP connections.
Use grep to Show Only Filenames on Linux
Filed under Files
Learn how to list only the names of the files that match the given pattern.
Get Username by User ID in Linux
Filed under Administration
Learn how to find the user’s name by a given UID
How to grep the ps Output With Headers
Filed under Processes
Learn how to find desired processes and preserve the header line of ps’s output.
Installing Vim/NeoVim Plugins
Filed under File Editing, Installation
Learn how to install plugins for Vim and NeoVim manually and using the vim-plug manager.
Find Processes by Keyword in Linux
Filed under Processes
Learn how to find processes’ information by a keyword.
How to Check Cron Logs in Linux
Filed under Administration
Learn how to check the cron jobs’ logs for two common cron implementations and two different logging systems.
Using Environment Variables in Nginx Config File
Filed under Administration
Learn how to use environment variables inside the Nginx config file.
How to Replace the Nth Occurrence of a String Using sed
Filed under File Editing
Learn how to replace the nth occurrence of a pattern by using a few advanced concepts in sed.
Compare Variables With Numbers in Bash
Filed under Scripting
Learn how to use square brackets and double parenthesis to compare variables with numbers in Bash
List Only Non-Empty Files in Linux
Filed under Files
Learn how to use the find command to list non-empty files under a directory
Run a Shell Script Without Using “sh” or “bash” Commands
Filed under Administration, Scripting
Learn the basics of shell scripts and how to use them just as we use other programs
Recall the Previous Command or Its Arguments in Bash
Filed under Scripting
Learn some tricks to reuse different parts from the last command in Bash
Create a GIF Animation From PNG Files
Filed under File Conversion
Learn how we can create a GIF animation out of PNG files from the Linux command line
Difference Between Unix and TCP/IP Sockets
Filed under Networking
Learn about TCP/IP sockets and Unix sockets
Allow Users in fstab File to Read and Write to a Partition
Filed under Administration, Filesystems
Learn more about the fstab file and how we can use it to allow users to read and write to a partition
How to Clean Up a Linux System
Filed under Administration
Leran how to clean a Linux system of unused files and directories to free up disk space
How is NeoVim Different From Vim?
Filed under File Editing
Compare Vim with its alternative implementation known as NeoVim
Difference Between ifconfig and ipconfig
Filed under Networking
Learn about the ipconfig and ifconfig network configuration commands
What Is X11?
Filed under Administration
Learn about the history of X11, how it is designed, the current state of X11, and why it will be replaced in the future
When to Avoid Using && in Shell Scripts
Filed under Scripting
Start from a script example and discuss a case we should avoid using && when writing shell scripts
Installing RPM Packages on Arch-Based Distros
Filed under Installation
Learn what’s inside the RPM package and go over the package installation mechanism under Arch Linux
Difference Between SFTP, SCP and FISH Protocols
Filed under Networking, Security
Learn about the SFTP, SCP, and FISH protocols and explore some of the advantages of using each
Customizing Bash Prompt
Filed under Administration
Examine various ways to customize the Bash shell’s command prompt
How to Install Virtualbox Extension Pack on Linux
Filed under Installation
Learn how to install the VirtualBox Extension Pack via the CLI and GUI
Installing and Managing Multiple Node.js Versions in Linux
Filed under Administration, Installation
Learn how we can install and manage multiple versions of Node.js on a single Linux machine
Clone Only the Space In-Use from a Disk
Filed under Filesystems
Learn how to clone only the part of the disk that is already in use
Remove Duplicate Lines from a File Without Sorting
Filed under Files
Learn how to use awk to remove duplicate lines from an input file
Figuring Out Which Files in /dev are Block USB Devices
Filed under Administration
Learn many ways we can use to check for the block USB storage devices attached to our system
Creating and Restoring a Linux System Image
Filed under Administration
Learn how we can create an image of our Linux machine and restore it later on
Get the Current User in Linux
Filed under Administration
Learn how to identify the current user in Linux
Adding a Column of Values in a Tab Delimited File in Linux
Filed under File Editing
Learn how to add a new column to a given TSV file in the Linux command line
Mounting MTP Devices on Linux
Filed under Filesystems
Learn how we can mount and unmount Media Transfer Protocol devices under Linux
Guide to Virtual Disk Images
Filed under Administration, Filesystems
Learn how to choose the correct virtual disk format and the scenarios they are best suited for
Checking Whether a Directory Exists in a Shell Script
Filed under Scripting
Learn how we can check whether a specified directory already exists
Get the Name of a Process from PID
Filed under Processes
Explore how to get the process name by a given PID
Concatenate String Variables in Bash
Filed under Scripting
Learn how to use Bash’s += operator and parameter expansion to concatenate variables
Difference Between Sourcing and Executing a Shell Script
Filed under Scripting
Learn the difference between sourcing a script and executing a script in Linux through examples
Why Is Using a Shell Loop to Process Text a Bad Practice?
Filed under Scripting
Learn the negative impacts of using a shell loop to process text contents
Quickly Clear the Contents of a File in Linux
Filed under File Editing
Learn how to clear only a file’s content from the Linux command line and keep the empty file
Script That Counts Files Then Removes the Oldest Ones
Learn how to create a bash script that counts the files in a directory, and if there are more files than a specific number, it removes the oldest ones
Find Out CPU Temperature From the Command-Line
Filed under Administration
Learn how we can check for the CPU temperature on the Linux terminal
Bash Command to Check if Oracle or OpenJDK Is Installed
Filed under Administration
Learn how to check if the current Java environment is Oracle JDK or OpenJDK
Split a List by Comma in Bash
Filed under Scripting
Learn how to parse CSV format data in Bash through examples
Add Leading Zeros to File Names
Filed under Files
Learn multiple ways to add leading zeros to file names in Linux
Dealing with Frozen Windows and Desktop on Linux
Filed under Administration, Processes
Learn different methods to deal with frozen graphical windows and desktop sessions
Output Document and Headers to Stdout Using Wget
Filed under Web
Learn a few ways in which we can output the document and headers to the stdout using the wget command
Find Matching Text and Replace the Next Line
Filed under File Editing, File Searching
Learn how to search a pattern and apply some text substitution in the next line using sed and awk
How to Open a Port in Linux
Filed under Networking
Learn how to use iptables in Linux to open ports for your application
Handling Special Characters in Shell Scripts
Filed under Scripting
Go through the most common use-cases regarding handling special characters in shell scripts
Guide to Getting DST-Safe Relative Dates
Filed under Scripting
Learn how to get relative dates in a DST-safe manner.
Using grep After a Specified Line Number
Filed under File Viewing
Learn three approaches to search for a pattern in a file, starting after a given line number
How Is the Linux Kernel Tested
Filed under Administration
Learn different tools and frameworks that we commonly use for different purposes to test the Linux kernel
How to Specify More Spaces as the Delimiter Using cut
Filed under Files
Learn two approaches to extracting fields from input when the delimiter is multiple spaces
When to Wrap Quotes Around Arguments in a Shell Command
Filed under Scripting
Look at various scenarios where different quotes may be used or omitted and understand how quoting works
List Files in a Zip Archive Without Decompressing
Filed under File Compression
Learn how to list the files in a Zip archive without decompressing it
Find Swap Memory Usage by Processes in Linux
Filed under Administration, Processes
Learn how to view the swap memory used by processes in Linux by viewing the processes’ information inside the proc directory and using the smem tool
Delete Selected Text in the Vi Editor
Filed under File Editing
Learn how to delete selected text from a vi editor in Linux using various techniques
Why Is \d Not Supported by grep’s Regex
Filed under File Searching
Learn why Regex \d isn’t supported by Linux commands such as grep and sed
Linux envsubst Command with Examples
Filed under Administration
Learn how to use envsubst to replace all referenced environment variables in a text file with their corresponding values
Using “/” in a Filename in Linux
Filed under Files
Learn about the Linux kernel restriction on using the “/” character in filenames and a workaround that we can use to include a Unicode character similar to “/”
The Conditional Variable Assignment Operator in a Makefile
Filed under Scripting
Learn the basics of using variables in a Makefile, followed by using the ?= operator for a more advanced use case
Substitute Shell Variables in a Text File
Filed under Administration, Scripting
Learn how to substitute shell variables with their values in a text file in the Linux command line
Recovering Websites From the Wayback Machine With Linux
Filed under Web
Learn how to download a static copy of a website archived in the Wayback Machine using wget
Moving Files in Linux While Showing Progress
Filed under Files
Learn how we can move files and see their progress in a terminal by using several alternatives to the Linux mv command
Redirect the Output of systemd Service to a File
Filed under Administration
Learn how to redirect the output of a systemd service to a given file with a simple example
Use grep to Find Content in Files and Move Matched Files
Filed under Files
Learn three approaches using grep to search files and move the found files to a directory in one shot
Link All Files from One Directory to Another in Linux
Filed under Files
Learn how to link all files from one directory to another in Linux using various techniques
The /bin/true and /bin/false Commands in Linux
Filed under Scripting
Take a closer look at the /bin/true and /bin/false commands with some use cases
grep in a tar.gz Archive
Filed under File Searching
Learn how to do grep on a tar.gz archive to find which files contain an interesting pattern
Getting a Process’ Child Processes
Filed under Processes
Learn several ways of getting the child processes of a process using pgrep, pstree, ps, and the proc file system
Set Default Permission for New Files and Subdirectories
Filed under Filesystems, Security
Learn how to use the setfacl helper utility to set default permissions for newly created files and directories
Run a Script With a Different Working Directory
Filed under Scripting
Learn how we can run a script or a program from a different directory in a shell script
How to Swap Two Files in the Linux Command Line
Filed under Files
Learn how to swap two files’ content using three mv commands
Round a Divided Number in Bash
Filed under Scripting
Learn how to perform various rounding methods in Bash
Running a Linux Command on Start-Up
Filed under Administration
Learn various ways to run a command or a script when a Linux system starts up
Setting the Vim Background Colors
Filed under Administration, Installation
Learn how to set the vim background colors with the help of the colorscheme and highlight commands
Set Environment Variables for a Bash Command
Filed under Scripting
Learn how to set environment variables only for one single command
Multiple glibc on a Single Linux Machine
Filed under Administration, Installation
Learn a couple of ways to use multiple glibc on our machine with g++ and patchelf
Save and Restore a Linux Process
Filed under Processes
Learn how we can save and restore a process using kill and criu
Pasting Text in Vim
Filed under File Editing
Learn the different essential registers in Vim and how we can access these registers to yank and paste text
Search for a Multi-Line Pattern in a File in Linux
Filed under File Searching
Learn how to search for text that matches a multi-line pattern in a file using grep and awk
Show Only the N-th Line After the Match
Filed under File Viewing
Learn how to only print the n-th line after the match using grep, sed, and awk
Read Values Into a Shell Variable From a Pipe
Filed under Scripting
Learn different methods to dynamically assign values to variables
Checking a File’s Age and Modification Time
Filed under Filesystems
Learn various ways to check the age or modification time of a file
Check What Killed a Linux Process
Filed under Processes
Learn what killed a Linux process and determine why it happened
Return Value of Substitutions With sed and awk
Filed under Scripting
Learn how to return different values from sed and awk depending on the substitution result
The lost+found Directory in Linux and UNIX
Filed under Filesystems
Learn about the lost+found directory and why it exists on Linux filesystems
Use of Dash “-” in Command-Line Parameters
Filed under Scripting
Learn the meaning of using “-” in the Linux command-line and how it is interpreted by the most common commands
xargs With Multiple Arguments
Filed under Scripting
Learn how to use the xargs command to handle multiple arguments
Automating User Account Creation with Password in Shell
Filed under Administration
Learn how to automate the process of creating a user
What’s the Difference Between initrd and initramfs?
Filed under Filesystems
Take a closer look at initrd and initramfs and explore some of their differences and similarities
tar Files of Certain Types
Filed under Files
Learn how to use the find and tar commands to archive files of certain types
Use sudo Command in Non-Interactive Mode
Filed under Administration
Learn approaches to run a command as the superuser without asking for a password
GUI Under Linux
Filed under Administration
Learn the graphics stack used in Linux-based operating systems and about some of the high-level GUI toolkits
Skip Hidden Files and Directories During Recursive Copy
Filed under Files
Learn how to copy directories recursively while excluding hidden files and directories
Linux – wget Timeout
Filed under Web
Take a closer look at wget’s timeout settings
Linux in Virtual Machine vs. on Native Hardware
Filed under Administration
Learn the differences between running Linux on a virtual machine and bare metal
Peak Memory Usage of a Linux Process
Filed under Processes
Learn a few tips and tricks using some well-known Linux commands to determine the peak memory usage of a process.
List One Filename per Line in Linux
Filed under Files
Learn how to use the ls command to list one file per line
Including Additional Files in .bashrc
Filed under Administration
Learn how to include additional scripts in the .bashrc file through examples
A Guide to POSIX
Filed under Administration
Learn the history behind POSIX, how it evolved, and some of the important POSIX standards
Insert a Line With Spaces Using sed
Filed under File Editing, Files
Take a closer look at how to use the sed command’s feature for inserting a new line when the new line contains spaces
Finding Files by Name and Extension
Filed under Files
Learn a few methods we can use to find files by name or extensions inside the Linux terminal using built-in utilities
Get the Last Word From Each Line
Filed under Files
Learn two ways to get the last word from each line of a file
How to Encrypt a Partition in Linux
Filed under Filesystems
Learned how we could encrypt our storage drives with Cryptsetup and VeraCrypt
Get CPU Usage of One Single Process Periodically
Filed under Processes
Learn how to build simple shell scripts to log the CPU usage of a single process
The Last Modification Time of a Directory
Filed under Files
Learn how to get a directory’s last modification time and what changes to a directory will affect the modification time
Find the Graphics Card Version from the Command Line
Filed under Administration
Learn several methods for finding the graphics card version for AMD, Nvidia, and Intel
Merge Two Files Line By Line in Linux
Filed under File Editing, Files
Learn how to column-wise combine two input files through examples
Display Modified Date When Using the find Command
Filed under Search
Learn different ways to include the modified dates of files in the search result of the find command
Working With Large Files in Linux
Filed under Files
Learn some common problems and explore tools that help when partially processing huge files
Split a File With the Header Line
Filed under File Editing, Files
Learn how to split an input file with the header line using the split and awk commands
Concatenation of Multiple Gzip Files
Filed under File Editing, Files
Learn some of the simple and useful and tools we can use to concatenate multiple Gzip files into one from the Linux command line
How to Base64 Encode an Image in Linux
Filed under Files
Learn how to convert an image to Base64 in Linux
An Introduction to RAID in Linux
Filed under Filesystems
Learn the building blocks of Linux software RAID and some more complex and advanced additions
Display the First “n” Characters of a File in Linux
Filed under File Viewing, Files
Learn how to use a variety of tools to print the first specified number of characters from a file
Find Out Image Dimensions From the Linux Terminal
Filed under File Viewing, Files
Learn to use several tools to quickly find out and display the dimensions of an image file from the Linux command line
Solving the “Too many levels of symbolic links” Error
Filed under Filesystems
Learn two ways to solve the “Too many levels of symbolic links” error
Commands That Will Open a URL in the Default Browser
Filed under Web
Learn several ways to open a URL in the default browser from the Linux command line
List Environment Variables in Linux
Filed under Scripting
Learn how to use the env, printenv, declare, or set command to list all variables in the system
Simulating the Enter Keypress in Bash Scripts
Filed under Scripting
Look at the methods we can use to bypass the confirmation prompts triggered by shell scripts and programs
Cutting Videos Based on Start and End Time using FFmpeg
Filed under File Editing
Learn a few approaches to clipping videos using FFmpeg, which is a suite of tools provided for video manipulations
View Images from the Terminal in Linux
Filed under File Viewing
Learn about different tools we can use to open images from the Linux command line
Linux: Delete Files Listed in a File
Filed under Files
Learn how to delete files listed in another file using pure Bash, xargs, sed, and awk
Delete All Lines in a File Starting From a Specific Line
Filed under File Editing, Files
Learn how to delete lines from a given line number until the end of the file using head, sed, and awk
Linux Process vs. Thread
Filed under Processes
Explore the details of the process and thread in the context of Linux
Read a Specific Line From a File in Linux
Filed under Files
Learn different approaches to read a specific line from a file
SSH Tunneling and Proxying
Filed under Administration, Networking, Security
Learn about ssh’s proxying and tunneling capabilities
Copying SSH Keys To Another Machine
Filed under Administration, Security
Learn how to copy our SSH keys to other machines
Get the Last Directory or Filename From a File Path
Filed under Files
Learn how to extract the last component from a given path string
Identify User in a Bash Script Called by sudo
Filed under Scripting
Learn two different ways to get the current login user in the shell script and a few common pitfalls
What are .a and .so Files?
Filed under Administration, Installation
Learn about archive libraries and shared object libraries
Count Lines in a File in Bash
Filed under Files
Learn the most common ways of counting the number of lines of a specified file using Bash
Extracting a Substring in Bash
Filed under Scripting
Learn various ways to extract substrings using the Linux command line
Solving the “Unary Operator Expected” Error
Filed under Scripting
Learn multiple techniques to address the“unary operator expected” error
What Happens to Open File Handle if File Is Moved or Deleted
Filed under Files, Filesystems
Learn how the system behaves when we delete, move, or replace a file that has open file handles
Capture the SSL Handshake with tcpdump
Learn how to capture SSL handshake messages over the network.
How to Copy a Directory to an Existing Directory in Linux
Filed under Files, Filesystems
Learn how to recursively copy a directory to an existing directory with or without overwriting
Remove the Last Character From Each Line in Linux
Filed under File Editing, Files
Learn how to remove the last character from all lines in a file through examples
How to Remove Symbolic Links
Filed under Administration, Filesystems
Learn how to remove a symbolic link using the rm and unlink commands
Redirect Output of a Process to a File and Standard Streams
Filed under Processes
Learn few common strategies to redirect the output of a process to a file and standard streams such as stdout and stderr simultaneously
Exclude Directories With grep
Filed under File Searching, Files
Learn three practical methods to exclude directories while recurring through the directory hierarchy using grep
Preserve Linebreaks When Storing Command Output to a Variable
Filed under Scripting
See why linebreaks in a shell variable can disappear in echo’s output and learn the right way to use shell variables in commands
Find and Delete Files and Directories
Filed under File Searching, Files
Learn three different ways to delete files or directories found by the find command
Using grep on Files That Match Specific Criteria
Filed under File Searching, Files
Learn how to execute grep on a set of filtered files
How to Create Soft Links to Directories
Filed under Filesystems
Learn how to create soft links to directories through examples
List All Groups in Linux
Filed under Administration
Learn two approaches to get all groups defined on the system
Copy Directory Structure Without Files
Filed under Filesystems
Learn three different ways to clone a directory structure without copying files under it through examples
Processing Linux Commands in Parallel
Filed under Processes
Learn how to use the Bash ampersand & operator, xargs, and GNU parallel to parallelize our tasks on the command line
Copy and Create Destination Directory if It Does Not Exist
Filed under Filesystems
Learn how to create the non-existing target directory automatically when we copy files
Find Files Not Owned by a Specific User in Linux
Filed under File Searching, Files
Learn how to search for files not owned by a particular user using the find command
Changing the Default Shell in Linux
Filed under Administration
Learn how to change a user’s default shell through examples
Linux Bash: Multiple Variable Assignment
Filed under Scripting
Take a closer look at how to do multiple variable assignment in Bash scripts
Showing a GUI Notification From a Shell Script in Linux
Filed under Scripting
Learn how to send a GUI notification from a shell script using notify-send and zentity
Run a Script on Startup in Linux
Filed under Administration, Scripting
Learn different options for executing a script on startup in Linux
sed Substitution With Variables
Filed under File Editing, Files
Take a closer look at some common mistakes made using sed substitution with shell variables
Evaluate XPath in the Linux Command Line
Filed under File Searching, Files
Learn how to evaluate XPath expressions using xmllint, XMLStarlet, and xidel
Using sed With a Literal String Instead of an Input File
Filed under Scripting
Have a look at how to use the sed command to process a literal string or shell variable.
How to Clean a Linux Zombie Process
Filed under Processes
Learn about zombie processes, ways to identify them and clean them
Remove the First Line of a Text File in Linux
Filed under File Editing, Files
Learn how to remove the first line from using sed, awk, and tail
Ensure Only One Instance of a Bash Script Is Running
Filed under Scripting
Learn different ways of ensuring only one instance of a bash script is running
Using Vim Registers
Filed under File Editing, Files
Learn about each type of Vim register through examples
How to Remove the Lines Which Appear in File B From Another File A in Linux
Filed under File Editing, Files
Learn several approaches to remove the lines that appear in file B from another file A
Remove the Last N Lines of a File in Linux
Filed under File Editing, Files
Learn different ways to remove the last n lines from an input file and the performance of those approaches
How to Use the mysql Client and Related Utilities
Filed under Administration, Installation
Learn the purpose of the most used MySQL utilities, along with some examples
What is a .pid File?
Learn a common way to store the PID using a .pid file and an example of how you would use it
How to Measure Separate CPU Core Usage for a Process
Filed under Processes
Learn a few options we can use to gather per-core CPU usage of a process
Creating a Temporary File in Linux
Filed under Files
Learn a few different ways to create temporary files when using Linux
Splitting a File at Given Line Numbers
Filed under File Editing, Files, Scripting
Learn how to split a file at given line numbers using head, tail, sed, and awk
How to Delete Multiple Files at Once in Bash
Filed under Scripting
Learn how to delete multiple files in one shot from the Linux command line
Run a Function in a Script from the Command Line
Filed under Scripting
Learn how to call shell script functions from outside the shell script file
Count Duplicated Lines in a Text File
Filed under Files
Learn a few ways to count repeated lines in a text file
Implement a Counter in Bash Script
Filed under Scripting
Learn how to implement a counter in a Bash script and some common pitfalls
Save Modifications In-Place with awk
Filed under Scripting
Learn how to do in-place editing with the awk command through examples
Recursive Search and Replace in Text Files
Filed under File Editing, Files, Search
Learn how to search and replace in text files recursively through examples
Tracking Down Where Disk Space Has Gone on Linux
Filed under Administration, Filesystems
Learn several ways of finding disk consumption points so that we can free up disk space
Introduction to iptables
Filed under Networking
Learn about iptables which is a user-space firewall that filters connections based on user-defined rules
Easy Ways to Determine Virtualization Technology
Filed under Administration
Learn how to determine virtualization technology using Linux commands
How to End Processes With kill, pkill, and killall
Filed under Processes
Learn the benefits of each command, along with examples where each one excels
Command Substitution
Filed under Scripting
Use command substitution when we need to use the output of other commands in our scripting logic
Send stdout to Multiple Commands
Filed under Scripting
Learn how to send the output of a command to multiple commands using three different solutions through examples
How to Use Multiple Databases with docker-compose
Filed under Docker
Learn how to run our services with docker-compose and MariaDB to access multiple databases
How to Print the Longest Line(s) In a File
Filed under Files
Learn different ways to find the longest lines from an input file and benchmark their performance
Using sed to Replace a Multi-Line String
Filed under File Editing, Files, Scripting
Learn a few advanced techniques for using sed to search and replace text that contains multiple lines
How to Pretty-Print XML From the Command Line
Filed under File Viewing, Files
Learn several ways to pretty-print an XML file using Linux commands
Reading Output of a Command Into an Array in Bash
Filed under Scripting
Learn a few ways to save multi-line output into a Bash array
Using xz Compression in Linux
Filed under File Compression, Files
Learn about using xz for compressing and decompressing files from the Linux command line
Bash Special Variables
Filed under Scripting
Learn how to use Bash special built-in variables to control the execution flow of a script
How to Show All Shared Libraries Used by Executables in Linux?
Filed under Processes
Learn several ways to list all shared libraries used by a program
How to Call an External Program Using awk
Filed under Scripting
Learn how to call an external program using awk
Introduction to Bash Array
Filed under Scripting
Learn about associative and index-based Bash arrays
How to Randomize Lines in a File in Linux
Filed under Files
Compare different ways to shuffle lines in text and discuss their pros and cons
Using gzip and gunzip in Linux
Filed under File Compression, Files
Learn how to use gzip and gunzip for compressing and uncompressing files from the Linux command line
How to Determine the Number of RAM Slots in Use
Filed under Administration
Learn how to use dmidecode and lshw to retrieve the RAM configuration of our system
Remove Blank Lines From a File
Filed under File Editing, Files
Explore some common scenarios for removing blank lines from a file through practical examples
Print Linux Directory Structure as a Tree
Filed under Files
Learn different ways to display a directory structure’s contents recursively in Linux
How to Join Multiple Lines Into One
Filed under Scripting
Learn several ways to merge multiple lines of input into a single line with customized delimiters
Process Multiple Input Files Using Awk
Filed under Files
Learn how to process multiple input files using the awk command using simple examples
Linux last Command
Filed under Administration
Learn how to get login related information using the last and lastb commands
Shut Down and Reboot Linux Systems From the Terminal
Filed under Administration
Learn some useful commands to reboot and shut down a Linux system from the command line
Is There a Way to ‘uniq’ by Column?
Filed under Scripting
Learn how to do the “uniq” operation on a column instead of the entire line
Linux tar Command
Filed under File Compression, Files
Learn how to use the tar utility to create, list, and extract archives
date Command in Linux
Filed under Scripting
We’ll take a closer look at the date utility and learn its common usages
Guide to the Linux touch Command
Filed under Files
Learn how to use the touch command to update the last modified time and last accessed time of a file or directory
The head and tail commands in Linux
Filed under File Editing, Files
Learn about the typical usages of the head and tail command through examples.
Linux watch Command
Filed under Scripting
Learn how to use the watch command to execute a command periodically and check the output of each execution
The echo Command in Linux
Filed under Scripting
Learn the echo command and its options through examples
Linux sort Command
Filed under Files
Learn the sort command through various examples
Linux ps Command
Filed under Processes
Learn the basics of the Linux ps command including filtering and customizing the output
Advanced File Permissions in Linux
Filed under File Permissions, Files, Security
Learn about special file permission flags in Linux
Linux tr Command
Filed under Files
Learn how to use the tr command through various examples
Introduction to File Locking in Linux
Filed under File Permissions, Files
Learn about two types of file locks in Linux some related commands through examples
Bash Functions in Linux
Filed under Scripting
Learn how to define and use Bash functions
Introduction to File MIME Types
Filed under Files
Learn about MIME types and how to get the MIME type of a file using Linux command-line utilities
Working with Hidden Files in Linux
Filed under Files
Learn the purpose of hidden files, how to create them, and how to view them
Execute Programs From Anywhere in Linux
Filed under Installation
Explore ways in which we can make a program executable from anywhere in our system
How to Use Command Line Arguments in a Bash Script
Filed under Scripting
Learn how to use command-line arguments inside the bash script
Finding the PID of the Process Using a Specific Port
Filed under Processes
Learn different approaches to finding the process listening on a particular port in Linux
How to Mount and Unmount Filesystems in Linux
Filed under Filesystems
Learn how to use the Linux mount command to attach various filesystems and detach them with umount
Encrypting and Decrypting Files in Linux
Learn how to encrypt and decrypt files in Linux systems using GPG
Guide to the Linux find Command
Learn how the find command can help us locate files and directories efficiently by using a combination of expressions and boolean logic
Concatenating Files in Linux
Filed under Files
Learn some useful operations that can make our life easier when concatenating files in Linux
Linux Commands – Find Broken Symlinks
Learn how to find broken links using simple and more complex approaches
Common Linux Text Search
Filed under File Searching, Files, Search
Learn how to perform some common text searching in Linux using the grep command-line utility
Copying in Linux with Visual Progress
Filed under Files
See how to copy files/folders in Linux, with full progress feedback.
Linux Commands – Repeat a Command n Times
Filed under Scripting
Learn several ways of repeating a Linux command multiple times
Getting the Absolute Directory of a File in Linux
Filed under Files
Learn how to get the absolute directory of a given file using two common Linux file system tools
Baeldung on Computer Science
- All
- Algorithms (17)
- Machine Learning (14)
- Networking (11)
- Programming (9)
- Security (8)
- Searching (6)
- OS (5)
- Artificial Intelligence (5)
- Software Architecture (4)
- Math and Logic (4)
- Latex (4)
- Data Structures (4)
- Web (3)
- Deep Learning (3)
- Trees (2)
- Sorting (2)
- Graphs (2)
- Graph Theory (2)
- Data Science (2)
- Core Concepts (2)
- Path Finding (1)
- Graph Traversal (1)
- Concurrency (1)
- Computer Vision (1)
How to Center Titles in LaTeX
Filed under Latex
Learn how to center titles in LaTeX by using the default functions and the specialized package sectsty.
What Is JSONP?
Filed under Software Architecture
Learn about JSONP.
What Is A Hopfield Network?
Filed under Machine Learning
Learn about the Hopfield Network, its characteristics, basic architecture, and training.
Converting Light Frequency to RGB
Filed under Algorithms
Learn how colors work in Nature and how computers represent them. Then, learn how to convert between the natural and computer representations.
Mobile Device Security
Filed under Security
Learn about the most prominent security threats devices face nowadays and discuss common and efficient mitigation techniques
Data Quality Explained
Filed under Data Science, Machine Learning
Learn the concept of ‘data’, its significance for businesses, and explore methods for assessing data quality.
Information Security Incident and Event Management
Filed under Networking, Security
Learn the main concepts of the SIEM process and review the tools for dealing with this critical part of our information security.
Differences Between Faking, Mocking and Stubbing
Filed under Programming
Learn the differences between faking, mocking, and stubbing when using test implementations for software components.
From RNNs to Transformers
Filed under Machine Learning
The choice between RNN/LSTM and Transformer models ultimately depends on the specific requirements of the task at hand, striking a balance between efficiency, accuracy, and interpretability.
System Design: Dependency Inversion Principle
Filed under Software Architecture
Learn about the Dependency Inversion Principle with examples and why we should use it.
Differences Between Multiprotocol Label Switching and Virtual Private LAN Service
Filed under Networking
Learn about MPLS and VPLS, which are tools for connecting geographically dispersed sites, their strengths, and weaknesses.
Disk Scheduling: LOOK and CLOOK Algorithms
Filed under OS
Learn about two disk scheduling algorithms – LOOK and CLOOK – and compare their performance and efficiency.
Differences Between POP3 and IMAP Email Protocols
Filed under Networking
Learn the differences between the POP3 and IMAP email protocols.
Serialization vs. Marshaling
Filed under Programming
Learn how serialization and marshaling work and see their most common use cases.
The Concepts of Dense and Sparse in the Context of Neural Networks
Filed under Machine Learning
Explore the concepts of dense and sparse layers in neural networks, their differences, and their applications
Regular Expression to Match Text Without a Certain Word
Filed under Searching
Learn how to determine whether a given English text expresses a certain word using the regular expression method.
Including Animations Into LaTeX Beamer Presentations
Filed under Latex
Learn about animations in LaTeX and explore how to include different animations with LaTeX Beamer.
The Bat Algorithm
Filed under Algorithms
Learn about a meta-heuristic algorithm called the Bat algorithm.
An Efficient Compression Algorithm for Short Text Strings
Filed under Algorithms
Explore the Burrows-Wheeler Transform (BWT) algorithm and how to combine it with the Run-Length Encoding (RLE) compressing algorithm to achieve a better compression ratio.
What Is Reactive Programming?
Filed under Programming, Software Architecture
Learn the basics of reactive programming and show an example of how reactive programming can be used in practice
Interfaces vs. Base Classes: the Similarities and Differences
Filed under Programming, Software Architecture
Learn how an interface compares to a base class.
How to Overcome Root Domain CNAME Restrictions?
Filed under Networking
Learn about various types of DNS records and how to overcome root domain CNAME restrictions.
Merge Sort: Top-Down vs. Bottom-up
Filed under Sorting
Take a closer look at the divide and conquer-based efficient sorting algorithm known as Merge sort.
CPU Scheduling: Arrival, Burst, Completion, Turnaround, Waiting, and Response Time
Filed under OS
Learn the concepts central to CPU scheduling and how they are used in different scheduling algorithms.
Retransmission Rules for TCP
Filed under Networking
Learn about TCP retransmission: its definition, causes, and how it works
What Is a Data Lake?
Filed under Data Science, Machine Learning
Learn about data lakes which harnesses the strength of big data technology and combined with the nimbleness of self-service.
Differences Between CPU and GPU
Filed under Core Concepts
Review the differences between a Central Processing Unit (CPU) and Graphics Processing Unit (GPU)
What Are Channels in Convolutional Networks?
Filed under Deep Learning
Learn about the channels of a Convolutional Neural Network (CNN) and how to modify input images.
What Is a Feature Descriptor in Image Processing?
Filed under Computer Vision
Learn about feature descriptors, feature vectors, and feature space.
Positioning Figures in LaTeX
Filed under Latex
Learn several techniques for positioning figures in a LaTeX document.
Recursion and Looping
Filed under Core Concepts
Learn about the recursion and looping programming constructs.
Finding the nth Element of a Singly Linked List
Learn how to find the nth element of the singly linked list by traversing through the list
The Sleeping Barber Problem
Filed under Algorithms
Learn about another famous inter-process communication and synchronization problem
Interpolation and Regression: Similarities and Differences
Filed under Math and Logic
Learn about the concepts of interpolation and regression
Introduction to Bloom Filter
Filed under Algorithms
Learn about Bloom filters, supported operations, usage, and limitations
Simulating Slow Internet and Network Errors
Filed under Networking, Security
Learn how we can simulate network conditions and some of the tools that we might use
Sort References by Order of Appearance with LaTeX/BibTeX
Filed under Latex
Learn how to sort a bibliography by order of appearance in a LaTeX document
Ant Lion Optimization
Filed under Algorithms
Learn about the Ant Lion Optimizer which gives us a meta-heuristic algorithm for optimization problems
Dragonfly Algorithm
Filed under Algorithms, Security
Learn about the Dragonfly Algorithm by describing its different steps and the mathematical model
Robust Estimators in Robust Statistics
Filed under Math and Logic
Learn the main concepts of Robust Statistics and the most common estimators of the central tendency and the statistical dispersion
How To Determine if a Point Is in a 2D Triangle
Filed under Algorithms
Learn three approaches to detect if a point lies inside a 2D triangle
ML: Train, Validate, and Test
Filed under Machine Learning
Learn about the training, validation, and testing aspects of neural networks
MD5 vs. SHA Algorithms
Filed under Security
Have a closer look at two cryptographic algorithms: MD5 (message-digest algorithm) and SHA (Secure Hash Algorithm) and how they compare.
Non-routable IP Address
Filed under Networking
Learn how and why to use non-routable IP addresses
When Coherence Score Is Good or Bad in Topic Modeling?
Filed under Machine Learning
Learn about Latent Dirichlet Allocation and the coherence score
How Do Markov Chain Chatbots Work?
Filed under Machine Learning
Learn how to use the Markov theory to create a chatbot capable of carrying on a meaningful conversation
Backtracking vs. Depth-First Search
Filed under Searching
Explore the difference between backtracking and depth-first search
Calculating Total Transmission Time of a Packet
Filed under Searching
Learn about packet transmission time and how we can approximately calculate it
Calculating the Parity Bit of a Bit Sequence
Filed under Networking
Learn a simple technique for checking errors in the transmission of a binary string
Q-Learning vs. Dynamic Programming
Filed under Machine Learning, Programming
Learn the similarities and difference between dynamic programming and Q-Learning
Why Mini-Batch Size Is Better Than One Single “Batch” With All Training Data
Filed under Deep Learning, Machine Learning
Learn the main differences between using the whole dataset as a batch to update the model and using a mini-batch
Intuitive Explanation of the Expectation-Maximization (EM) Technique
Filed under Machine Learning, Math and Logic
Explore the Expectation-Maximization (EM) technique – a popular approach for estimating parameters of probabilistic models
Candidate Elimination Algorithm
Filed under Algorithms
Learn about the Candidate Elimination Algorithm (CEA), which is a supervised technique for learning concepts from data
Two-Way Handshake and Three-Way Handshake
Filed under Networking, Security
Learn how these handshaking protocols typically work, their benefits, and their shortcomings
Stack Data Structure
Filed under Data Structures
Learn the basic features and common operations of a stack
Using a Hard Margin vs. Soft Margin in SVM
Filed under Deep Learning, Machine Learning
Learn about the difference between using a hard margin and a soft margin in SVM.
What Is the Difference Between Trap and Interrupt?
Filed under OS
Learn about two popular types of events in the OS: trap and interrupt
Expression vs. Statement
Filed under Programming
Learn some basic similarities and differences between statements and expressions
Routers vs. Switches vs. Access Points
Filed under Networking, Security
Learn some of the differences between common devices such as modems, routers, switches, and access points
Physical vs. Virtual Memory
Filed under OS
Learn about physical and virtual memory and why we need these two separate entities
Print All Paths With a Given Sum in a Binary Tree
Filed under Trees
Learn how to construct a binary tree path sum sequence in linear time
Refactoring
Filed under Programming
Learn that refactoring is a natural and essential part of a software’s evolution
Understanding Complexity of Cryptographic Algorithms
Filed under Security
Examine computational complexity issues within cryptographic algorithms
Serialize and Deserialize a Binary Tree
Filed under Graph Theory, Trees
Learn algorithms to serialize and deserialize a binary tree
Do Sessions Violate RESTfulness?
Filed under Web
Take a closer look at what defines a session and whether or not sessions violate the principles of RESTfulness
Comparison Between Uniform-Cost Search and Dijkstra’s Algorithm
Filed under Path Finding
Learn how to use both Dijkstra’s algorithm and the uniform-cost search algorithm to find the shortest paths between vertices in a graph
Cross-Origin Resource Sharing and Why We Need Preflight Requests
Filed under Web
Learn how the CORS policy is implemented in browsers and why we have preflight requests
Interpretation of Loss and Accuracy for a Machine Learning Model
Filed under Machine Learning
Loss and accuracy are essential values to take into account when training models. Let’s take a closer look at their meaning.
Difference Between REST and HTTP
Filed under Networking, Programming, Web
Learn the primary differences between REST and HTTP.
Topic Modeling with Latent Dirichlet Allocation
Filed under Algorithms, Artificial Intelligence
Learn about topic modeling, some of its applications, and a specific technique named Latent Dirichlet Allocation
String Similarity Metrics – Edit Distance
Filed under Algorithms, Artificial Intelligence
Learn about the ways to quantify the similarity of strings
Algorithms to Check if a Linked List Is a Circular Linked List
Filed under Algorithms, Data Structures
Learn two linear-time algorithms that can check if a linked list is a circular linked list
Multiclass Classification Using Support Vector Machines
Filed under Artificial Intelligence, Machine Learning
Learn how SVM is applied for the multiclass classification problem
Converting a Word to a Vector
Filed under Algorithms, Artificial Intelligence
Learn the main techniques to represent words as vectors and the pros and cons of each method
Greedy Algorithm to Find Minimum Number of Coins
Filed under Math and Logic, Searching
Learn a greedy algorithm to find the minimum number of coins for making the change of a given amount of money
What Is a Semaphore?
Filed under Concurrency
Learn about possible process synchronization problems to better understand how to use semaphores effectively
Generate All Permutations of an Array
Filed under Algorithms, Data Structures, Searching
Learn algorithms to generate permutations of an array
What Is an Augmenting Path?
Filed under Graph Theory, Graphs
Learn what augmenting paths are in the context of maximum matchings and maximum flows
How to Reverse a Linked List
Filed under Algorithms, Programming
Have a look at the algorithm for reversing a linked list.
How Compilers Work
Filed under OS
Understand the compilation process which converts high-level source code to low-level machine code.
Topological Sort of Directed Acyclic Graph
Filed under Algorithms, Data Structures, Graphs
Learn how to make a topological sort on a DAG in linear time
Advantages and Disadvantages of Neural Networks
Filed under Artificial Intelligence
Learn when it’s advisable to use neural networks and when we should avoid using neural networks and favor other techniques instead
Stemming vs Lemmatization
Filed under Algorithms
Learn about two techniques widely used in Natural Language Processing and Information Retrieval
Knuth-Morris-Pratt Algorithm
Filed under Graph Traversal
Learn about the Knuth-Morris-Pratt algorithm that searches for occurrences of a word inside a large text
Baeldung on Ops
- All
- Docker (23)
- Kubernetes (12)
- Jenkins (3)
- Git (2)
- Cloud (2)
- Logging (1)
Difference Between kubectl apply and kubectl create
Filed under Kubernetes
Learn how the kubectl object management works with kubectl create and kubectl apply.
Sort Pods by Age in Kubernetes
Filed under Kubernetes
Learn how to fetch Kubernetes pod details in the ascending and descending orders of their creation time.
Guide to Eclipse JKube
Filed under Docker, Kubernetes
Learn about JKube. It simplifies many aspects of building Java applications for Kubernetes and OpenShift.
How to Force Kubernetes to Re-Pull an Image
Filed under Kubernetes
Explore several methods to force Kubernetes to re-pull an image.
How to Switch Namespaces in Kubernetes
Filed under Kubernetes
Learn various methods such as using the kubectl command with the –namespace flag, modifying the Kubernetes configuration file, and updating the context with the kubectl config set-context command.
ClusterIP, NodePort, and LoadBalancer: Kubernetes Service Types
Filed under Kubernetes
Learn about the three primary service types in Kubernetes, their benefits, limitations, and best practices for their usage.
Introduction to Grafana Loki
Filed under Logging
Learn about Grafana Loki, a log aggregation system that’s part of the Grafana ecosystem.
Difference Between Deployment and ReplicaSet in Kubernetes
Filed under Kubernetes
Learn about Kubernetes Deployment and ReplicaSet features, advantages, use cases, and their key differences.
Introduction to MicroK8s
Filed under Kubernetes
Learn how MicroK8s can allow us to run full-featured Kubernetes clusters with a small CPU and memory footprint.
Getting Started With K3s
Filed under Kubernetes
Learn the main features of K3s and create a simple cluster as an example.
Communicating With Docker Containers on the Same Machine
Filed under Docker
Explore how two containers can connect on the same machine using Docker Compose
Difference Between COPY and ADD in a Dockerfile
Filed under Docker
Learn the differences between the two ways to copy files from the source system and when it makes sense to use each one
Exclude a Sub-Folder When Adding a Volume to Docker
Filed under Docker
Learn how to exclude folders when mounting volumes with some Docker Compose examples
Assign Static IP to Docker Container and Docker-Compose
Filed under Docker
Learn how Docker manages IP allocation and how to add a static address to a container.
Mounting Multiple Volumes on a Docker Container
Filed under Docker
Learn how to mount multiple volumes on a Docker container with the command line and with Docker Compose
Showing Differences Between Two Docker Images
Filed under Docker
Look at the structure of Docker images and how to see the differences between two images
Communication Between Multiple Docker Compose Projects
Filed under Docker
Learn how to use a network to connect multiple Docker Compose projects with some docker-compose.yml examples
Difference Between links and depends_on in Docker Compose
Filed under Docker
Learn the difference between Docker links and depends_on with some practical examples using Docker Compose
Ingress vs. Load Balancer in Kubernetes
Filed under Kubernetes
Learn about different mechanisms to help manage network traffic and ensure requests get to their desired destination inside a cluster
Share Volume Between Multiple Containers in Docker Compose
Filed under Docker
Learn how to share Docker containers’ data using volumes
Introduction to Docker Secrets
Filed under Docker
Learn how Docker secrets can help us store configuration separate from our code
How to Inject Git Secrets in Jenkins
Learn how to securely inject git secrets into Jenkins pipelines and jobs
Difference Between Docker-Compose and Kubernetes
Filed under Docker, Kubernetes
Learn some of the differences between Docker Compose and Kubernetes using a simple example
Difference Between Docker Save and Export
Filed under Docker
Look at the difference between the Docker save and export commands
Difference Between Docker, Dockerfile, and Docker Compose
Filed under Docker
Learn the differences between Docker, Dockerfile, and Docker Compose and how they fit into a larger technology ecosystem
Difference Between Running and Starting a Docker Container
Filed under Docker
Learn how the Docker run and start commands are different while going through some practical examples
Squash the Last X Commits Using Git
Filed under Git
Learn what Git squashing is, talk about when we need to squash commits, and take a closer look at how to squash commits
Comments in a Jenkinsfile
Filed under Jenkins
Learn how we can use different types of comments in Jenkinsfile and their syntax
Kubernetes with kind
Filed under Kubernetes
Primarily a testing tool for Kubernetes, kind is also handy for local development and CI
List Active Brokers in a Kafka Cluster Using Shell Commands
Filed under Docker
Explore few shell commands to get the list of active brokers in a running cluster
Expose More Than One Port With Docker
Filed under Docker
Learn how to declare more than one port to expose and how to bind the exposed ports with the ports of the host computer
Guide to Setting Up Apache Kafka Using Docker
Filed under Docker
Learn how to create single-node and multi-node setups of Apache Kafka in Docker
Guide to Docker Volumes
Filed under Docker
Learn about Docker volumes and how to manage and connect them to containers
Guide to Jenkins Parameterized Builds
Filed under Jenkins
Learn how to use build parameters with both Jenkins jobs and pipelines
Tips for Creating Efficient Docker Images
Filed under Docker
Learn how to write efficient Docker images and the reasons behind each recommendation
Copying Files To And From Docker Containers
Filed under Docker
Look at some different ways we can copy files to and from Docker containers
Best Practices When Using Terraform
Filed under Cloud
Learn about some best practices when using the popular DevOps tool Terraform
Introduction to Terraform
Filed under Cloud
Take a quick tour of Terraform, one of the most popular tools used by DevOps teams to automate infrastructure tasks
Exploring a Docker Container’s Filesystem
Filed under Docker
Learn various ways to explore the filesystem of a Docker container
Introduction to Docker Compose
Filed under Docker
Learn about Docker Compose’s main features using a simple example