Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Open Source Articles
Page 99 of 123
Delete expoted environment Variable in Linux shell
Overview This article explains how to delete an environment variable from the system. An environment variable is a special kind of variable that can be used by all processes running on your machine. The name of this variable is EXPORTED_VARIABLE. You can use it to pass information between different programs or even between different users. For example, you might want to export the path to the directory where you store your music files so that other users can access them easily. Environment Variable The environment variables are stored as part of the process’s memory space and they are accessible through ...
Read MoreDifference Between .a and .so files
Overview A programmer may want to write three different programs. However, he realizes that some of the functionality needed for each program could be shared among them. Therefore, he decides to create a library containing these shared features. A library is basically a collection of code and data that other people can use. On Linux, archives (located at the.a file extension) contain compiled code, whereas shared objects (.so files) contain interpreted code. Here, we’ll examine how software runs under Linux and the purposes of the library and archive files. We’ll also see some examples of how we can create these ...
Read MoreImplement shell file protection in Linux
Overview This article will show you how to protect your files from unauthorized access using the Linux file system permissions, and how to use chmod command to set permissions for a specific user or group of users. Besides the Linux file permission mechanisms that help us keep our files safe from misuses, most Linux shells have built-in safeguards against accidental file overwrite. We’ll cover some of them here. Protecting Files With noclobber All POSIX shell implementations support the noclobber option. If you're using a shell script, meaning the shell will complain if you try to overwrite an existing directory. By ...
Read MoreAvoiding unwanted directory while using zip
Overview There are many different ways to compress and collect file on Linux systems. We have several options for doing so: using the command line tools, GUI applications. However, if we share files with Windows or Mac users, the ZIP file remains the most convenient option. We want to maintain its convenience. We’ll look at how to organize our files so they aren't cluttered with unnecessary folders. We'll learn some basic file management techniques. These might seem obvious if you're doing them manually, but can get tricky when you're working with scripts. We'll use the bash shell's built−in push/pop commands ...
Read MoreDelete empty files and directories in Linux
Overview We'll learn how to remove empty directories and empty file on Linux. Empty directories don't take up any disk space, but they're good to keep them tidy. We should clear out old files and folders periodically. All the instructions in this tutorial are for Linux systems. They won't work on Windows. Delete Empty Files in a Directory You can use the `find` command to remove all the empty files in an existing folder. $ find . -type f -empty -print -delete To delete empty directories, we first need to search for all the empty folders in the specified ...
Read MoreFind last Directory or file from a given path
Overview We often use shell scripts or work with Linux commands when handling paths. Extracting the last part of a given file name is a fairly common task. For example, if we're trying to access /tmp/dir/target, then we want to be able to access target as a file name. Yes, this looks easy enough. But there might be some edge cases that could cause us to fail. We’ll take a close look at this problem and explore some common solutions. Discussion of Common Solutions We know that Linux file systems don't allow slashes (/) to be parts of filenames or ...
Read MoreCopying SSH Keys to different Linux Machine
Overview When working with SSH keys, it is important to keep them safe. We can protect ourselves against accidental deletion by storing them in an encrypted file. We can also make sure they aren’t compromised if someone tries to steal them by keeping them offline. For example, we could store them in a password protected folder on a USB drive. However, this isn’t the best way to do things. If you have multiple machines and want to copy your key from one machine to another, then there are better ways of doing that than copying the key files over. This ...
Read MoreMost Common Flags Used in /proc/cpuinfo
Overview We’ll go through some of the features available on the CPU installed on our computer’s motherboard. We’ll briefly look at the concept of virtual file systems before we dive into the details of the topic. Afterward, we’ll discuss the flags obtained from the /proc/cpuinfo virtual directory for different CPU manufacturers such Intel, AMD, and Arm. Virtual Files A virtual file system (VFS) is an abstraction layer that allows us to treat files as if they were stored on a disk drive. The VFS provides a way to access data without having to know where it actually resides. For example, ...
Read MoreWhat Is Double Dot (..) And Single Dot (.) In Linux?
Abstract Linux terminal/Shell contains several instances where a dot (.) is utilized. When displayed in the output of a command, a dot would also convey some significance. This article will examine the various situations in which a dot is typically used in Linux and the additional locations where this might be shown. Double Dot (..) and Single Dot (.) Example $ ls -laxo Output Total 892 drwxr-xr-x 122 tutorial article 48 18 Dec 05:07 ./ drwxr-xr-x 54 tutorial article 4096 16 Dec 04:03 ../ -rw-rw-rw- 19 tutorial article 960 02 Dec 09:57 operations In the following example, we ...
Read MoreRunning a Shell Script on a Remote Machine Through SSH
Abstract It's challenging to envision what would happen if you couldn't control your computer remotely because remote access to computers has long been necessary. The best way to connect to a remote machine is by SSH for Linux-based machines. The SSH client application can be used to log into a distant computer or server and run commands on that computer. When a command is supplied, it is executed instead of a login shell on the remote host or server. Users frequently need to work with distant systems. which requires them to log into the remote server, carry out specific actions, ...
Read More