User Tools

Site Tools


linux:commands

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
linux:commands [2024/10/14 13:27] – [Scan with NMAP] Jan Formanlinux:commands [2025/09/30 12:00] (current) – [erase full drive] Jan Forman
Line 27: Line 27:
 dd if=/dev/zero of=/dev/sdY bs=64K conv=noerror,sync dd if=/dev/zero of=/dev/sdY bs=64K conv=noerror,sync
  
 +
 +====== Show inode number on disk ======
 +<code>
 +#!/bin/bash
 +if [ $# -ne 1 ];then
 +  echo "Usage: `basename $0` DIRECTORY"
 +  exit 1
 +fi
 +echo "Wait a moment counting inode usage..."
 +find "$@" -type d -print0 2>/dev/null | while IFS= read -r -d '' file; do
 +    echo -e `ls -A "$file" 2>/dev/null | wc -l` "files in:\t $file"
 +done | sort -nr | head | awk '{print NR".", "\t", $0}'
 +exit 0
 +</code>
linux/commands.txt · Last modified: 2025/09/30 12:00 by Jan Forman