Commandline-fu

Show apps that use internet connection at the moment.

lsof -P -i -n | cut -f 1 -d " "| uniq | tail -n +2

Resize SVG to PNG and maintain transparent background:

convert -resize 24x24 -background none source.svg output.png

Remove pacman orphaned package:

pacman -Rs $(pacman -Qtdq)

Extract lines containing SEARCHSTRING from filename:

grep 'SEARCHSTRING' filename

Extract lines containing not SEARCHSTRING from filename:

grep -v 'SEARCHSTRING' filename

Return filenames:

grep -l 'SEARCHSTRING' *.xml

Pacman update then shutdown

pacman -Syu | shutdown -h now

Backup

sudo tar -cv --one-file-system --exclude=/home/* --exclude=/dev/* --exclude=/proc/* --exclude=/sys/* -f /home/system-backup.tar /* && sudo chown `whoami`:`whoami` /home/system-backup.tar

List files installed by package

pacman -Ql package

Replace all %20 in a filename

rename -n 's/%20/_/g' *
commandline.txt · Last modified: 2010/12/19 11:53 (external edit)
Kleine Websites, die ein Wiki als CMS verwenden.de