From ArchWiki
Revision as of 15:51, 28 November 2010 by Whoops (talk | contribs) (general stuff and other things)
Jump to: navigation, search

Things that involve stuff

Things I had a hard time finding stuff out about

run applications from terminal [1]

Make it not block the terminal:

$ app &

And have it behave quietly:

$ app & > /dev/null

Oh no, I already started it!

press <ctrl+z>
$ bg

And now I want to close the terminal but not end the application...

$ disown

Stuff I keep forgetting things about

Remove pacman orphans + configs


$ pacman -Rsn $(pacman -Qtdq)


Stoopid cache directories, wanna rsync home!

for directory in $(find -iname cache); do 
 newdir=$(echo /home/cache/$(echo $directory | sed "s/\.\/\.\|\/\|\./_/g")); 
 mv $directory $newdir; 
 ln -s $newdir $directory; 

Find trash

Possibly orphaned files...

LC_ALL=C find /bin /opt /sbin /usr /var /etc -type f -exec pacman -Qo {} \; | grep "No package owns"

Neat easy incremental backup

sudo rsync -av --delete --backup --backup-dir=/media/BACKUP/$(date +%F) --force --ignore-errors /home /etc /boot /media/BACKUP/recent > /media/BACKUP/$(date +%F_%T).log