filesystem

All posts tagged filesystem by Linux Bash
  • Posted on
    Featured Image
    Every Linux user, at some point, comes into incidental if not direct contact with the /dev directory. This unassuming folder is fundamental to how Linux manages and interacts with devices, from hard drives and USBs to virtual devices like random number generators. This article aims to demystify the /dev directory, discussing its importance, how it functions, and the way users interact with it, delving into the abstract yet practical universe of device management in Linux. In Linux and other Unix-like operating systems, /dev is a directory in the file system that contains special files. These aren't regular files where data is read from or written to disk.
  • Posted on
    Featured Image
    Understanding the details about files and filesystems can be crucial for system administration, troubleshooting, and automated scripting in Linux environments. One of the tools adept at providing this information is the stat command. I will guide you through what the stat command can do, how you can use it, and how to install it on different Linux distributions. The stat command in Linux is used to display detailed information about given files or file systems. Usage of stat allows users to retrieve metadata about files, including file size, inode number, permissions, modification time, access time, and more. It's a powerful tool for scripts and system checks, as it provides precise details in a programmable format.
  • Posted on
    Featured Image
    When working with Linux, understanding and managing your storage devices effectively is crucial whether you're a system administrator, a developer, or a power user managing your personal system. The blkid command is a powerful tool designed for locating and identifying block devices such as hard drives, SSDs, and their partitions with critical information like UUIDs and filesystem types. This guide dives into the basics of blkid, its usage, and how to install it across various Linux distributions using different package managers. The blkid program is part of the util-linux package, which comes with numerous essential tools for system management. blkid provides you with the attributes of block devices installed on your system.
  • Posted on
    Featured Image
    In the world of Linux, efficiently managing files and directories is crucial for both system administrators and regular users. While there are numerous methods to manage files, symbolic and hard links provide powerful ways to access the same content from multiple locations without duplicating data. This blog post delves into the intricate uses of symbolic and hard links in Linux Bash and includes operating instructions for various package managers such as apt, dnf, and zypper. Before diving into practical applications, let's clarify what symbolic and hard links are: Symbolic Links (Symlinks): These are pointers to the original file or directory.
  • Posted on
    Featured Image
    If you’ve ever wanted to enhance your Bash scripts by including detailed system information without relying on additional tools or utilities, then procfs (the virtual process file system) is your invaluable resource. Mostly used in Unix-like operating systems, procfs provides a more nuanced peek into your system directly from the file system. For Linux users, procfs is typically mounted at /proc, and it offers a treasure trove of data concerning system hardware and the running processes. This blog post will explore how to leverage procfs for extracting system information in Bash scripts. We will cover various commands and files within /proc that can be useful for scripting purposes.
  • Posted on
    Featured Image
    Managing disk partitions is a critical skill for any system administrator or Linux enthusiast. Efficient partition management can lead to better disk space allocation, which is crucial for system performance and data organization. Linux provides powerful tools like fdisk and parted that facilitate these tasks. Below, we dive into how to use these tools and install them using different package managers like apt, dnf, and zypper. fdisk is one of the most traditional tools used in Linux for disk partitioning. It is a command-line utility and supports MBR (Master Boot Record) partitions.
  • Posted on
    Featured Image
    After reading this document you should be able to identify why Linux defines its filesystem hierarchy in one big tree and explain the role of the filesystem hierarchy standard, explain what is available at boot in the root directory (/), explain each subdirectory purpose and typical contents. The aim here is to be able to create a working bash script which knows where to put its different data stores including lockfiles, database(s) or temporary files; including the script itself. One Big Filesystem As with all Linux installations there is a set protocol to follow which could be looked at as one big tree starting from its root, /.