Category Archives: unix-linux

How to delete all .svn in a folder

If you need to remove all .svn folders in a project, run

find . -name ".svn" -exec rm -rf {} ;

or more precisely, run

find . -type d -name '.svn' -print -exec rm -rf {} ;

The script starts from the current directory and searches recursively to the sub-folders. This script also works on other names by replacing “.svn”. But if the name is too general especially if you use the regular expression, you may end up by deleting a bunch of folders/files you don’t want to. A safer way is to run find first to verify all found folders/files are really what you intend to remove. read more

Change gedit embedded terminal colors

For Ubuntu only:

  1. install dconf-tools and gconf-editor
  2. in gconf-editor, navigate to apps → gnome-terminal → profiles → Default
  3. in dconf-tools, navigate to org → gnome → gedit → plugins → terminal
  4. uncheck “use-theme-colors”
  5. copy values of “background-color“, “foreground-color“, and “palette“, from gconf-editor to dconf-tools

Install Gnuplot 4.6 with PDF on Ubuntu

It is always hard to install gnuplot manually on Ubuntu, especially if you want to plot diagram in PDF, JPEG, or PNG formats. This short 101 article describes one way to install gnuplot with PDF on Ubuntu.

  1. download pdflib-light and extract to $PDFLIB
  2. compile and install pdflib-light

    cd $PDFLIB
    ./configure  
    make  
    sudo make install
    
  3. refresh lib cache: sudo ldconfig

  4. download gunplot and extract to $GNUPLOT

  5. compile and install gnuplot

    cd $GNUPLOT  
    ./configure --with-pdf  
    make  
    sudo make install  
    

Note: other packages which can be installed via apt-get read more

Best Markdown Editors for Windows, Linux, and the web

Markdown is a lightweight markup language, allowing people “to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML)”. An excellent Markdown Syntax Guide is by Daring Fireball. Sites such as GitHub, reddit, Diaspora, Stack Overflow, OpenStreetMap, and SourceForge use Markdown to facilitate discussion between users. GitHub uses “GitHub Flavored Markdown” (GFM) for messages, issues, and comments. It differs from standard Markdown (SM) in a few significant ways and adds some additional functionality. read more

Share folders via Samba without a password

Switching from Windows to Linux, the first thing might be to share folders on Linux with Windows. That will enable transferring files easily. In Linux, such operation is not always trivial. On Ubuntu, We need to install the samba to share files/folders. Here are instructions: read more