Labels

Showing posts with label D. Show all posts
Showing posts with label D. Show all posts

Disk and Filesystem Analysis

# badblocks -v /dev/hda1
check bad blocks on disk hda1 [man]

# dosfsck /dev/hda1
repair / check integrity of dos filesystems on disk hda1 [man]

# e2fsck /dev/hda1
repair / check integrity of ext2 filesystem on disk hda1 [man]

# e2fsck -j /dev/hda1
repair / check integrity of ext3 filesystem on disk hda1 [man]

# fsck /dev/hda1
repair / check integrity of linux filesystem on disk hda1 [man]

# fsck.ext2 /dev/hda1
repair / check integrity of ext2 filesystem on disk hda1 [man]

# fsck.ext3 /dev/hda1
repair / check integrity of ext3 filesystem on disk hda1 [man]

# fsck.vfat /dev/hda1
repair / check integrity of fat filesystem on disk hda1 [man]

# fsck.msdos /dev/hda1
repair / check integrity of dos filesystem on disk hda1 [man]
READ MORE - Disk and Filesystem Analysis

Disk Space

# df -h
show list of partitions mounted [man]

# dpkg-query -W -f='${Installed-Size;10}t${Package}n' | sort -k1,1n
show the used space by installed deb packages, sorting by size (debian, ubuntu and alike) [man]

# du -sh dir1
estimate space used by directory 'dir1' [man]

# du -sk * | sort -rn
show size of the files and directories sorted by size [man]

# ls -lSr |more
show size of the files and directories ordered by size [man]

# rpm -q -a --qf '%10{SIZE}t%{NAME}n' | sort -k1,1n
show the used space by rpm packages installed sorted by size (fedora, redhat and alike) [man]
READ MORE - Disk Space

dpkg DEB packages commandline

# dpkg -i [package.deb]
install / upgrade a deb package [man]

# dpkg -r [package]
remove a deb package from the system [man]

# dpkg -l
show all deb packages installed on the system [man]

# dpkg -l | grep httpd
show all deb packages with the name "httpd" [man]

# dpkg -s [package]
obtain information on a specific package installed on system [man]

# dpkg -L [package]
show list of files provided by a package installed on system [man]

# dpkg --contents [package.deb]
show list of files provided by a package not yet installed [man]

# dpkg -S /bin/ping
verify which package belongs to a given file [man]
READ MORE - dpkg DEB packages commandline