Back to commands

Hosting Operations

Read-only, can be slow

Find the Largest CI Artifacts

CI upload, cache, or packaging steps are slow or failing, and oversized artifacts may be the cause.

Command

find artifacts -type f -printf '%s %p\n' | sort -nr | head -10

Before you run this

System impact: Read-only. Can create load on large logs, directories, filesystems, or process tables.

When not to use it: Do not delete artifacts from this output alone; confirm which files are required.

Expected output

The ten largest artifact files with byte sizes and paths.

System impact

Read-only, can be slow. Nothing changes. The shell prints the largest artifact files.

Scope this to the smallest useful path or service on busy systems.

Recovery / rollback: no state is changed.

When to use it

Use when artifact upload, cache restore, package creation, or disk usage looks suspicious.

When not to use it

Do not delete artifacts from this output alone; confirm which files are required.

next steps

Related commands

Hosting Operations Can be slow

Rank Old Cleanup Candidates by Size

The oldest file is not always the file that buys back meaningful space.

find /var -xdev -type f -mtime +7 -printf '%s %TY-%Tm-%Td %p\n' 2>/dev/null | sort -nr | head
Hosting Operations Can be slow

List Largest Files in a Backup

Large backup files are where storage surprises usually start.

find backup -type f -printf '%s %p\n' | sort -nr | head
Hosting Operations Can be slow

Find the Newest Build Logs First

The failing file is usually one of the newest artifacts.

find artifacts logs -type f \( -name '*.log' -o -name '*.txt' \) -printf '%TY-%Tm-%Td %TH:%TM %p\n' | sort -r | head
Hosting Operations Can be slow

Find Directories Burning Inodes

Inode cleanup starts by finding the directory with too many files.

find /var/cache -xdev -type f -printf '%h\n' 2>/dev/null | sort | uniq -c | sort -nr | head
Hosting Operations Can be slow

Review Log Files Before Cleanup

Before truncating logs, prove which log files are large and how old they are.

find /var/log -xdev -type f -printf '%10s %TY-%Tm-%Td %p\n' 2>/dev/null | sort -nr | head -50
Study mapping

Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.

  • LPIC-1 style command-line practice
  • LFCS style performance-task practice
  • Linux+ style troubleshooting review

Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.