Skip to content

Instantly share code, notes, and snippets.

@Blackjacx
Created March 16, 2015 21:54
Show Gist options
  • Save Blackjacx/00f797ded91801ef2507 to your computer and use it in GitHub Desktop.
Save Blackjacx/00f797ded91801ef2507 to your computer and use it in GitHub Desktop.
Unix Commands
### system ###
# Disc Space Usage
df -h
# Folder size
du -sh <folder_name>
# Process Information
top
### PDF ###
# shrink a pdf in filesize (2 steps)
1) convert pdf to ps (better with acroread)
acroread -toPostScript Bafög2008.pdf
2) reconvert ps to pdf with other compression settings
ps2pdf -dPDFSETTINGS=/screen Bafög2008.ps Bafög2008opt.pdf
### dvd ###
# copy dvd fully
vobcopy -m -t $FILEPREFIX
# make a small vob file for experiments
mencoder Dateiname.vob -ovc copy -oac copy -ss 400 -endpos 30 -o kleine_testdatei.vob
#########
# mount a mdf image
sudo mount CNC3.mdf ./cnc3ke/ -o loop
# restore/reconfigure grub boot loader ( sudo grub-install --root-directory=/mnt /dev/sda sudo mount /dev/sda2 /mnt )
1) boot from live cd and open terminal
2) sudo fdisk -l (to show partition configuration)
3) sudo mount /dev/sda2 /mnt (mount root partition - supposed to be /dev/sda2)
4) sudo grub-install --root-directory=/mnt /dev/sda
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment