Saturday, April 25, 2015

Replace a string in several files

[CONTEXT]
You need to replace a string in several files

[HOW]
There several options to do this, 
  • sed:         Syntax:    $ sed -i "s/old_string/new_string/g" files
                    Example  $ sed -i "s/foo/bar/g" *.txt 
  • perl:       Syntax:    $ perl -i -p -e "s/old_string/new_string/g;" files  
                        


[SOURCE]
sed man page 
http://www.cyberciti.biz/faq/unix-linux-replace-string-words-in-many-files/ 


Monday, August 25, 2014

Managing your latex bib files in linux II

[CONTEXT]
You want a program to manage your Latex bibliography file.
[HOW]
Jabref  is a really good program to organize and modify your bib files in Latex using a very friendly GUI. Also this program can generate  automatically the key for the bib entries and you can include the link to your pdf files.

To install it, we can use the package in Debian's repository
# aptitude install jabref

[SOURCE]
http://jabref.sourceforge.net/

Synchronize a folder outside the default Dropbox's directory

[CONTEXT]
You want to synchronize a folder with Dropbox, without move that folder to
the default  Dropbox's directory
[HOW]
Create a symbolic link from the folder that you want to synchronize to the Dropbox directory, for example

$ ln -s /path/to/folder/to/sync ~/Dropbox

The permissions of the files or folders should be (at least) owner:r/w, group r/w, and others: r
-rw-rw-r-- 


[SOURCE]
http://www.dropboxwiki.com/tips-and-tricks/sync-other-folders

Monday, December 2, 2013

Check infromation of CPU, memory and Hard Drive information

[CONTEXT]
In order to check the information of your CPU, memory and Disk usage.
[HOW]
To check your CPU information, just execute

$ cat /proc/cpuinfo
or
$ lscpu

To check your Memory information, just execute

$ cat /proc/meminfo

To check your Disk Usage information, just execute

$ df -h


[SOURCE]

man proc
man df

Friday, October 11, 2013

Removing annoying console beeps

In order, to remove the beep sound of your linux console just type the following command, in your console (in the directory /home/$your_user)

$echo 'set bell-style none' >> ~/.inputrc

Monday, August 12, 2013

Managing your e-books

[CONTEXT]
You have a collection of e-books and you want organize them, make conversion between file types, read them, or even synchronize them with your e-reader.
[HOW]
Calibre is a Software to manage you e-book collection. You can use it as a reader, converter, news reader, among other features.
To install it, we can use the package in Debian's repository
# aptitude install calibre
[SOURCE]
http://calibre-ebook.com/

Managing your latex bib files in linux

[CONTEXT]
You want a program to manage your Latex bibliography file.
[HOW]
Kbibtex  is a really good program to organize and modify your bib files in Latex using a very friendly GUI.


To install it, we can use the package in Debian's repository
# aptitude install kbibtex

[SOURCE]
http://home.gna.org/kbibtex/