From ArchWiki
Revision as of 15:53, 28 November 2010 by Whoops (Talk | contribs) (Things I had a hard time finding stuff out about)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Things that involve stuff

Fundamental 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

Oh god, it asks me if I want it to continue, how do I get it back?

$ fg

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