Mukul Latiyan

Mukul Latiyan

363 Articles Published

Articles by Mukul Latiyan

Page 6 of 37

How to replace spaces in file names using bash script on Linux?

Mukul Latiyan
Mukul Latiyan
Updated on 17-Mar-2026 649 Views

Consider a case in which one directory on my local machine looks something like this − immukul@192 dir1 % ls -ltr total 0 -rw-r--r-- 1 immukul staff 0 Jul 3 20:44 sample code.txt -rw-r--r-- 1 immukul staff 0 Jul 3 20:44 sample code with love.txt In the above directory named dir1, there are two .txt files present and both these files have spaces in between the words in their name, and we need to replace these spaces using a bash script on Linux. In order to achieve what we want, we must first be aware ...

Read More

How to resume a partially transferred file over ssh on Linux?

Mukul Latiyan
Mukul Latiyan
Updated on 17-Mar-2026 971 Views

File transfer interruptions are common when copying large files over SSH connections. Network instability, connection timeouts, or accidental process termination can cause transfers to fail partway through. While the scp command doesn't support resuming interrupted transfers, Linux provides rsync as a powerful alternative that can resume partially transferred files. The scp command forces you to restart the entire transfer from the beginning, overwriting any partially transferred data. This becomes extremely frustrating and time-consuming when dealing with large files or unreliable network connections. What is Rsync? Rsync (Remote Sync) is a versatile command-line utility for synchronizing files and ...

Read More

How to run a crontab job every week on Sunday?

Mukul Latiyan
Mukul Latiyan
Updated on 17-Mar-2026 938 Views

In order to create a crontab job to run every Sunday, we first need to explore and understand what a crontab job is. A crontab is nothing but a list of commands that we can run during a cron job. A cron job is a utility that schedules automatic execution of commands at specific times. Creating a Crontab Job We can start a cron job with the help of bash script by following the commands shown below − crontab -e This will open a file which you can edit, insert the cron job ...

Read More

How to search contents of multiple pdf files on Linux?

Mukul Latiyan
Mukul Latiyan
Updated on 17-Mar-2026 2K+ Views

The pdfgrep command in Linux is a powerful utility used to search for specific text patterns within PDF files. It functions similarly to the standard grep command but is specifically designed for PDF documents, making it invaluable for searching through multiple PDF files simultaneously. The search pattern can be a simple text string or a regular expression, allowing for flexible and precise searches across your PDF collection. Installing pdfgrep For Ubuntu/Debian sudo apt-get update -y sudo apt-get install -y pdfgrep For CentOS/RHEL yum install pdfgrep For Fedora ...

Read More

How to see top processes sorted by actual memory usage on Linux?

Mukul Latiyan
Mukul Latiyan
Updated on 17-Mar-2026 505 Views

Linux provides the famous top command utility that displays information about running processes, including their process IDs, CPU usage, and memory consumption. However, the default output is not sorted by memory usage, and the display order changes frequently as processes consume different amounts of resources. In many scenarios, system administrators need to identify which processes are consuming the most memory to troubleshoot performance issues or optimize system resources. This requires sorting processes by their actual memory usage in descending order. Using the ps Command The most effective approach is to use the ps command with sorting options. ...

Read More

How to set a proxy for wget on Linux?

Mukul Latiyan
Mukul Latiyan
Updated on 17-Mar-2026 816 Views

Wget is a Linux command-line utility used to retrieve files from the World Wide Web (WWW) using protocols like HTTP, HTTPS, and FTP. It is a freely available package that can be downloaded and installed on any Linux-supporting architecture. One of the key features of wget is its ability to automatically resume downloading where it left off in case of network issues. It also supports recursive downloads and will keep trying to download files until they are retrieved completely. Installing wget For Ubuntu/Debian sudo apt-get install wget For CentOS/RHEL/Fedora sudo yum ...

Read More

How to set the environmental variable LD_LIBRARY_PATH in Linux?

Mukul Latiyan
Mukul Latiyan
Updated on 17-Mar-2026 6K+ Views

LD_LIBRARY_PATH is an environment variable in Linux that tells the dynamic linker where to look for shared libraries at runtime. Setting this variable allows applications to find custom libraries that are not installed in standard system directories like /usr/lib or /lib. There are several ways to set environment variables in Linux, ranging from temporary session-based settings to permanent system-wide configurations. Let's explore how to properly set the LD_LIBRARY_PATH environment variable. Setting Environment Variables Permanently To set an environment variable permanently for your user session, you need to modify your shell's configuration file. Follow these steps to set ...

Read More

How to set the GOPATH environment variable on Ubuntu?

Mukul Latiyan
Mukul Latiyan
Updated on 17-Mar-2026 9K+ Views

Before setting up GOPATH or GOROOT on your local environment, we must verify that Go is correctly installed on your system. Type the following command in your terminal to check the Go installation − go version If it outputs nothing or displays "go: command not found", then you need to first download the Go binary and install it before setting up the GOPATH. When Go is properly installed, the output will look something like this − immukul@192 linux-questions-code % go version go version go1.16.3 darwin/amd64 Understanding GOPATH GOPATH is ...

Read More

How to show all shared libraries used by executables in Linux?

Mukul Latiyan
Mukul Latiyan
Updated on 17-Mar-2026 2K+ Views

We know that a shared library is a library that can be linked to any program at runtime. In order to view all the shared libraries used by an executable we make use of the Linux command utility known as ldd. We can easily locate the shared libraries on a Linux machine, as they usually start with lib* prefix and have extensions like .so (shared object). Let's first understand and see examples of how to make use of the ldd command that Linux provides us with. ldd is a command utility that Linux provides us with and is ...

Read More

How to simulate delayed and dropped packets on Linux?

Mukul Latiyan
Mukul Latiyan
Updated on 17-Mar-2026 749 Views

Network emulation (netem) is a Linux kernel component that provides network emulation functionality for testing protocols by simulating real-world network conditions like delays, packet loss, and reordering. It emulates the properties of wide area networks, making it invaluable for network testing and protocol development. The current stable version of netem allows emulation of variable delay, packet loss, packet reordering, and packet duplication. This makes it possible to test how applications and protocols behave under various network conditions without requiring actual network infrastructure. Enabling netem There are two ways to use the network emulator. First, you can enable ...

Read More
Showing 51–60 of 363 articles
« Prev 1 4 5 6 7 8 37 Next »
Advertisements