Apollo Connecting the World

Diligence and Intelligence

Posts Tagged ‘Linux

[zz]Converting JPG Images to EPS

leave a comment »

from: http://fclose.com/b/linux/3549/converting-jpg-images-to-eps/

I write a lot latex documents and most of the documents have images in it. Latex deals EPS very well, while sometimes we need to add JPG / PNG images to it. I find converting the JPG images to EPS ones is the most convenient way to embed JPG images to latex documents. On Linux, this is quit easy with ImageMagick.

You need to install ImageMagick if it is not already installed in the system:

# yum install ImageMagick

Convert image image.jpg from JPG to EPS format:

$ convert image.jpg image.eps

For other image formats, the command is similar.

Written by apollozhao

2012/02/10 at 10:48

Posted in LaTeX, Linux

Tagged with , , , , ,


leave a comment »

from: http://server.zdnet.com.cn/server/2008/0617/931251.shtml


不同的GNU Linux版本的系统服务大都一样,但是也会有一些小区别,一般都提供50个左右的服务。








Read the rest of this entry »

Written by apollozhao

2011/09/21 at 15:36

Posted in Linux

Tagged with , ,

How to check the version of Linux (Fedora, Ubuntu, or other issues)

leave a comment »

If we want to check whether a Linux is a Fedora, or Ubuntu, or SuSE or whatever, in command line, we can simply do like this:

1. go to /etc, search for the file with string “issue” or “release”
$cd /etc
$ls *issue* (ls *release*)

2. read the found file, e.g.:
$more issue
$more lsb-release


Note: This method applies in Fedora, Ubuntu. For other systems the blogger has not verified.


Written by apollozhao

2011/09/20 at 15:35

Posted in Linux

Tagged with , ,


leave a comment »

$lspci | grep VGA



Written by apollozhao

2011/08/24 at 19:49

SSH Tunnel in Linux

leave a comment »

It is easy in Windows to create SSH tunnel with the help of many tools (e.g. putty). How to do it in Linux? It is easier. 🙂

Suppose mike has an account on remote machine sshserver.com, which is used to be the one to connect.

Open an terminal, type command:
$ssh -N mike@sshserver.com -D 7070

Input the password, and now you have created the SSH tunnel. To use it as a proxy, just config your browser, add a socks 5 proxy, with the proxy as: “”.

OK, now you can surf the Internet with the proxy.


Some articles use -L parameter in the SSH commands, please refer to [1].

[1] http://blog.fredrikbostrom.net/2009/04/10/ssh-tunnel-from-the-command-line


Written by apollozhao

2011/07/01 at 11:45

Posted in Internet, Linux, ssh, SSH Tunnel

Tagged with , , , ,


leave a comment »


例:搜索: content

grep -r content ./

Written by apollozhao

2011/05/25 at 15:09

Posted in grep, Linux

Tagged with , , ,

Count number of lines of all files in a directory

leave a comment »

In Linux, given a directory “dir”, if you want to count number of lines of all files (e.g. .txt files) in the directory (inclucing sub-directory), simply type this command:

find ./ -name ‘*.txt’ | xargs wc -l


NOTE: This method works in Fedora 12

Written by apollozhao

2011/04/05 at 18:39

Posted in Linux, wc

Tagged with , , , , ,