Setup FTP server on Linux

Linux: Install Java

Many developers and programmers choose to use a Linux system as their work environment because of its stability, speed, and ease of use. To get started with programming Java, or to simply run Java applications or applets on Linux, you will need to install the appropriate Java software package. Although this is pretty easy to do, the instructions will vary depending on a user’s Linux distribution, what version of Java they wish to use, and whether they need the JDK (Java Development Kit) or just the JRE (Java Runtime Environment).

Read more

How to Run Python Scripts with Bash: Tips and Examples

How to Use a Bash Script to Run Your Python Scripts

Python is a popular programming language used in a wide range of applications, from data analysis and scientific computing to web development and artificial intelligence. Bash is a powerful scripting language used primarily in Unix and Linux environments for automating tasks and running commands. By combining the two languages, developers can create powerful scripts that can automate complex tasks and workflows. In this article, we’ll explore various techniques for running Python scripts with bash, including passing arguments, activating virtual environments, and running scripts in the background. We’ll also provide examples of real-world scripts that demonstrate these techniques in action.

Read more

Bash script to test hard drive transfer speed

Bash script to test hard drive transfer speed

The Linux operating system gives us many ways to measure the performance of our computer, including individual components such as the hard drive. There are multiple tools for the job, and it is also possible to use built in tools and create our own test to measure real results. In this tutorial, we will see how to use a Bash script to test the transfer speed of a hard drive on a Linux system. We will also learn about some other tools which can supplement our Bash script and give us and give us additional data points when it comes to the transfer speed of our hard drive, including read and write speed.

Read more

Nested Loops in Bash Scripts

Nested loops in bash scripting are an essential tool for automation and efficiency when working with complex data structures, such as arrays and lists. By nesting one loop inside another, it’s possible to iterate through multiple levels of data with a single script, reducing the need for manual intervention and improving overall productivity. In this article, we will explore the basics of nested loops in bash scripts, including how to use them for various purposes, common errors to avoid, and advanced techniques for optimizing their performance. Whether you’re a beginner or an experienced bash scripter, this guide will help you master the art of nested loops and take your scripting skills to the next level.

Read more

Handling User Input in Bash Scripts

Bash scripting is a powerful tool that can automate various tasks on a Unix-like system. One crucial aspect of Bash scripting is handling user input. Accepting, validating, and processing user input is an essential part of creating robust and reliable Bash scripts. In this article, we will discuss various methods and best practices for handling user input in Bash scripts.

Read more

List of Python Escape sequence characters with examples

List of Python Escape sequence characters with examples

When programming in Python, escape characters can be used in order to tell the compiler that it should treat the next character or characters differently. For example, we can tell Python to print a quote " as an actual quote character, rather than interpreting it to be part of the Python code. Other special characters like \t can create TAB spaces, and \n can create new lines. In this tutorial, you will see a list of Python escape sequence characters and examples that you can use on a Linux system.

Read more

How to extend the Thunar file manager with custom actions

How to extend the Thunar file manager with custom actions

Thunar is the file manager included in Xfce, a free and open source Desktop Environment which implements the traditional desktop metaphor, and has become the favorite of many users which switched to it when the GNOME project introduced the GNOME shell. Thunar is light on resources but doesn’t lack functionalities which can be extended further by creating custom actions.

Read more

Set and Get environmental shell variable using c++

Set and Get environmental shell variable using c++

Environment variables in the Bash shell can be accessed or set using a C++ program. This is facilitated by the getnenv() and putenv() functions defined in the C/C++ stdlib.h library. Environmental variable expansion is a great feature of a Linux shell as it enables programmers and users to rely on the environment settings of each user separately. C++ getenv() will read all exported environmental variables and putenv() will set existing or create new variables.

Read more

How to integrate dialog boxes in shell scripts with Whiptail

How to integrate dialog boxes in shell scripts with Whiptail

The ability to create secure shell scripts is essential not only for system administrators, but also for users who wants to automate repetitive tasks. Sometimes, from our shell scripts, we need to provide the user with some kind of information, ask him/her to provide some input, choose from a set of alternatives, or just ask for his/her confirmation before performing a potentially dangerous operation. All those actions, can be performed from the command line, of course, but to make our scripts more user-friendly, we can use of Whiptail to customize and display textual widgets.

Read more

Example of simple bash script ftp client

Example of simple bash script ftp client

If you need to use FTP to upload some files to a server every so often and want to save yourself some time, you can make a simple Bash script to transfer the files quickly. Rather than entering the username, password, and directory manually, we can get our Bash script to do this tedious legwork for us. In this tutorial, you will see an example script to make FTP transfers a cinch on a Linux system.

Read more