User Tools

Site Tools


linux:linux_shell

Differences

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

Link to this comparison view

Next revision
Previous revision
linux:linux_shell [2025/01/21 07:40] – created azmanlinux:linux_shell [2025/01/21 08:11] (current) azman
Line 1: Line 1:
-====== Linux Shell Stuff ======+====== Linux Shell ======
  
 Useful command-line stuff. Useful command-line stuff.
 +
 +===== Raw Disk Data =====
 +
 +Using ''dd''<code bash>$ dd if=ifile of=ofile skip=offs count=size status=progress</code> where ''skip'' and ''count'' values are in sector counts.
 +
 +<file text dd_size.txt>
 +- note on byte-size & sector size (for 512-bytes sector size)
 +01M:     1048576byte @ 000002048sect
 +01G:  1073741824     @ 002097152
 +10G: 10737418240     @ 020971520
 +50G: 53687091200     @ 104857600
 +80G: 85899345920     @ 167772160
 +</file>
  
 ===== File Management ===== ===== File Management =====
Line 8: Line 21:
  
 <code bash> <code bash>
-find . -type d -empty -print +find . -type d -empty -print 
-find . -type d -empty -delete+find . -type d -empty -delete
  
-find -type f \( -name "*zip" -o -name "*tar" -o -name "*gz" \) -size +1M -delete +find -type f \( -name "*zip" -o -name "*tar" -o -name "*gz" \) -size +1M -delete 
-find -type f \( -name "*zip" -o -name "*tar" -o -name "*gz" \) -size +1M -exec rm {} ++find -type f \( -name "*zip" -o -name "*tar" -o -name "*gz" \) -size +1M -exec rm {} +
 </code> </code>
  
linux/linux_shell.1737416441.txt.gz · Last modified: by azman