Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

How to set JAVA_HOME on OSX

Answer:

To set the JAVA_HOME environment variable on OSX, add the following line in your ~/.bash_profile

export JAVA_HOME=$(/usr/libexec/java_home)

That's all.

How to install homebrew for Mac?

Answer:

Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn't include with OS X. To install under Mac's terminal, type

# /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"

That's it.

Show changed files with git log

Answer:

In svn, you can use

# svn log -v

to show a detail list of changed files in each commit.

In git, you can use to have similar effect:

# git log --stat.

Erase old downloaded packages from apt-get's cache

Answer:

The erase old downloaded packages from apt-get's cache, which are stored under the location: /var/cache/apt/archives

Try:

# sudo apt-get autoclean

Show svn log for a particular folder

Answer:

To show the svn log for a particular folder, just need to use..

# svn log /data/foo

------------------------------------------------------------------------
r1935 | john@example.com | 2011-11-23 19:05:43 +0800 (Wed, 23 Nov 2011) | 1 line

Fixed the crash issue (Jira 2001)
------------------------------------------------------------------------
r1934 | john@example.com | 2011-11-23 18:47:54 +0800 (Wed, 23 Nov 2011) | 1 line

Added missed files