Friday, December 14, 2012

Total memory use in Chromium

As percentage


run this and see the last numbers in the result


ps -eo pmem,comm | grep chromium | cut -d " " -f 2 | paste -sd+ | bc

Thursday, December 6, 2012

Edit PPA Sofware sources manually

the list is here: /etc/apt/sources.list

so

sudo gedit /etc/apt/sources.list

Wednesday, December 5, 2012

Set default internet browser in terminal

sudo update-alternatives --config x-www-browser

- enter password, see something like this





 Type the number of your browser of choice and then enter.

Saturday, December 1, 2012

Script to translate multiple filenames

Source

 
The script is:
-------------
#!/bin/bash

    for i in *.txt
    do
        mv "$i" "$(echo ${i%.txt} | translate-bin -s google -f ru -t fr).txt";
    done
--------------

You need to install this:

sudo apt-get install libtranslate0 libtranslate-bin

1. replace extension (txt, jpg, mp3 etc, in the three places where it appears)  with the one desired

2. replace in  '-f ru -t fr' (from one language to the other) with the two languages involved

3. save that in a file and make it executable

4. run script in the directory with the files (or run `./script` in terminal there) - use a different file manager if it doesn't work in  pcmanfm

(The script replaces the old old filenames irreversibly so backup first.)