Essential Linux System Administration Commands

Disk Partition Analysis To identify which partition a specific directory resides on, utilize the df command with the -h flag for human-readable output. For example, to determine the partition containing the /var directory: [root@server ~]# df -h /var Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_system-lv_root 50G ...

Posted on Mon, 01 Jun 2026 17:47:32 +0000 by duelist

5 Methods to Clear File Contents in Linux

Using Standard Redirection The most straightforward way to empty a file is by using the shell redirection operator > without a preceding command. This truncates the file to zero length immediately. > server.log Using the Colon or True Command The : (colon) is a shell built-in command that does nothing and returns a success status ...

Posted on Sun, 17 May 2026 19:53:20 +0000 by TheMoose

Automating Duplicate File Management with Python

Automating Duplicate File Management with Python When managing large collections of files, duplicates can accumulate and consume unnecessary storage space. This solution demonstrates how to use Python to automatically identify and relocate duplicate files to a designated directory. Implementation Approach The following Python script implemen ...

Posted on Sat, 16 May 2026 15:03:58 +0000 by lily

Essential Linux File Management Commands

Creating Files with touch Syntax touch [options] filename Key Options Option Description -m Update modification timestamp -d Set specific datetime Examples # Create file in current directory $ touch example.txt # Create file with absolute path $ touch /tmp/sample.txt # Create multiple files $ touch file1.txt file2.txt file3.txt $ ...

Posted on Thu, 14 May 2026 23:14:51 +0000 by richinsc

Decoding PostgreSQL’s pg_filenode.map File Structure

Understanding OID to Filenode Mapping In a standard PostgreSQL instance, each table and index corresponds to a physical file on disk. This relationship is primarily managed through the relfilenode identifier found in the pg_class catalog. For most user-defined tables, the Object Identifier (OID) aligns directly with this filenode value. However ...

Posted on Sat, 09 May 2026 22:44:49 +0000 by hebisr

Linux File System Operations Reference

Data Replication, Transfer, and Removal Replicating Data with cp # Syntax cp [options] source destination cp [options] source... target_directory # Options -r, -R # Copy directories recursively -i # Prompt before overwriting -u # Copy only when the source is newer or destination is missing -v # Verbose output -p ...

Posted on Sat, 09 May 2026 15:00:52 +0000 by benjam

Essential Linux Command Line Operations for System Navigation and File Management

Navigating the Filesystem pwd Command pwd Displays the absolute path of the current working directory. cd Command cd [target_directory] Changes the current shell session's working directory. Usage: cd ..: Move up to the parent directory. cd /home/user/docs: Navigate using an absolute path (starts from root /). cd ../projects: Navigate using ...

Posted on Sat, 09 May 2026 03:41:05 +0000 by y_oda2002