Tag

ls

0 views collected around this technical thread.

Laravel Tech Community
Laravel Tech Community
Nov 7, 2023 · Fundamentals

How to Check File Size in Linux Using ls, du, and stat Commands

This article explains three common Linux commands—ls, du, and stat—for checking file sizes, showing the exact syntax, example usage with a sample file, and how each command displays size information, including human‑readable formats.

command-linedufile size
0 likes · 3 min read
How to Check File Size in Linux Using ls, du, and stat Commands
Efficient Ops
Efficient Ops
Jan 11, 2022 · Operations

Why Does du Show 9 GB While ls Shows 100 GB? Understanding Linux Sparse Files

This article explains why Linux utilities like du and ls can report dramatically different file sizes, introduces the concept of sparse files, and shows practical commands to identify and correctly handle them on Unix-like systems.

System Administrationdufilesystem
0 likes · 5 min read
Why Does du Show 9 GB While ls Shows 100 GB? Understanding Linux Sparse Files
Tencent Database Technology
Tencent Database Technology
Dec 27, 2017 · Fundamentals

Why ls Slows Down on Directories with Millions of Files and How to Speed It Up Using getdents

The article explains that the ls command becomes slow on directories containing millions of files because it repeatedly calls the getdents system call through readdir, and demonstrates how directly using getdents with a larger buffer can reduce the listing time from several seconds to under one second.

Performancefilesystemgetdents
0 likes · 10 min read
Why ls Slows Down on Directories with Millions of Files and How to Speed It Up Using getdents