Managing File Timestamps and Generating Fixed-Size Files in Linux

Setting File Modification Time The stat command displays detailed timestamp information for a file: stat /opt/test.conf To create a file or update its modification time, use touch with the -m and -d options: # Create or update modification time to July 7, 2020 touch -m -d "2020-07-07 00:00" /opt/abc.txt If the file doesn’t exist, it ...

Posted on Mon, 14 Sep 2026 16:49:46 +0000 by ChetUbetcha

Fixing USB Drive Issues in Linux

Repairing Corrupted USB Partitions with fsck When a USB drive contains corrupted file blocks, the fsck utility can scan and repair filesystem errors. This tool works on both individual partitions (such as /dev/sdc1) and entire disks (such as /dev/sdc). Before runing any repair commands, identify the correct device using: lsblk Then execute fsc ...

Posted on Thu, 27 Aug 2026 16:22:59 +0000 by elementaluk

Linux File Operations and Disk Management: A Practical Guide

File System and Disk Management Basics To inspect disk usage on your system, use df -h: df -h To check directory sizes, use du with various options: du -h – display sizes in human-readable format (K, M, G). du -a – show sizes for all files in the directory tree. du -d N – limit depth to N levels. For example, du -h -d 0 ~ shows only the ho ...

Posted on Thu, 21 May 2026 18:04:04 +0000 by Daen