untar to differect directory

tar -C /usr/local/uvscan/tmp/ -xvf /datos/updates/dat-5031.tar

No Comments

Copy hidden files

cp -rT /from/directory /to/directory

No Comments

Find string in various files

find . | xargs grep ’string’

No Comments

Removing Unwanted Startup Files or Services in Debian

http://www.debianhelp.co.uk/unwanted.htm

No Comments

Attempt to invoke directory as script

Attempt to invoke directory as script

This occurs when Apache is configured with ScriptAlias or SetHandler and a request is made for a directory path. The problem is that under those circumstances, all resources under a certain path are considered to be executable.

To get around this and allow DirectoryIndex to work again, use AddHandler with Options ExecCGI, or SetHandler in a <Files> stanza.

For example, replace this:

ScriptAlias /cgi-bin /var/www/cgi-bin

with this:

Alias /cgi-bin /var/www/cgi-bin
<Directory /var/www/cgi-bin>
 AddHandler cgi-script cgi pl
 Options ExecCGI
</Directory>

http://wiki.apache.org/httpd/DirectoryAsScript

No Comments

Debian Source List

데비안을 dvd로 인스톨 했을때 소스 리스트가 cd-rom으로 되어있다

서버가 먼곳에 있거나 리모트 인스톨할때는 dvd로 인스톨을 못하므로 인터넷으로 다운 받아서 설치 해야 하는데

이때는

sudo vi /etc/apt/sources.list
# deb cdrom:[Debian GNU/Linux 5.0.3 _Lenny_ - Official amd64 DVD Binary-1 20090905-11:36]/ lenny contrib main

#deb cdrom:[Debian GNU/Linux 5.0.3 _Lenny_ - Official amd64 DVD Binary-1 20090905-11:36]/ lenny contrib main

#deb cdrom:[Debian GNU/Linux 5.0.3 _Lenny_ - Official amd64 DVD Binary-3 20090905-11:36]/ lenny contrib main

#deb cdrom:[Debian GNU/Linux 5.0.3 _Lenny_ - Official amd64 DVD Binary-4 20090905-11:36]/ lenny contrib main

#deb cdrom:[Debian GNU/Linux 5.0.3 _Lenny_ - Official amd64 DVD Binary-5 20090905-11:36]/ lenny contrib main

#deb cdrom:[Debian GNU/Linux 5.0.3 Update DVD 20090907: amd64 DVD 1]/ lenny contrib main non-free

apt-get 명령할때 cd-rom에서 인스톨 하는 것에 주석을 달아준다.

No Comments

아이튠스에서 중복된 노래 찾기

아이튠스에서 아이폰이나 아이팟으로 노래를 이리저리 옮기다보면 중복된 노래가 생기는 경우가 있다.

그럴 경우에는 우선 왼쪽 “LIBRARY” 에서 “Music”을 클릭한 다음 “File -> Show Duplicates” 를 클릭하면 중복된 노래 리스트를 보여준다.

노래 제목이 같으면 중복된 노래로 보여지는데 이때 앨범과 가수를 확인하며 지워줘야 한다. 같은 노래 제목이지만 가수가 같을 수도 있고 그 노래의 라이브 버전도 있으니 잘 확인하고 지워준다.

Picture 1

,

No Comments

피나클 (The Pinnacles)

뉴질랜드 오클랜드에서 차로 약 한시간반정도 걸리는 코로만델에 위치한 피나클 (The Pinnacles)

산 모양새가 흡사 한국의 산과 비슷하며 계곡과 깨끗한 물도 한국의 계곡을 생각나게 한다.

대부분 뉴질랜드의 산은 그리 높지 않고 가파르지도 바위도 많이 없다. 개인적으로 뉴질랜드에서 오른 산중 가장 한국의 산과 비슷한 산이었다.

초입부터 정상까지 2~3시간 걸리는데 길도 잘 되있었다. 뉴질랜드 겨울 트램핑중 곤욕중의 하나가 진흙 길인데 전날과 아침에 비가 왔음에도 불구하고 길이 거의 자갈이나 바위로 이뤄져있어서 등산화를 적시지 않아도 될 정도로 상태가 좋았다.

정상 바로 직전에는 산장이 있었는데 키친도 갖춰져 있고 물도 나왔다. 편하게 캠핑하기에도 좋은 곳인듯 싶다.

산장에서 정상까지는 30분정도 걸리는데 끝에는 많이 가파라서 바위에 박힌 쇠 사다리를 타고 올라가야 한다. 난이도는 그리 어렵지 않지만 산행을 한 3주정도 쉬고 정상까지 갔다오니 (왕복 5시간정도) 이틀이 지난 지금도 다리가 많이 뻐근하다.

IMG_0333

전날 비가 많이 와서인지 냇물이 많이 불어 있었다.

IMG_0366

정상에서 바라 본 뉴질랜드의 동해

IMG_0371

절벽의 모습이 한국의 산과 비슷하다.

, , , , ,

2 Comments

데비안 (Debian) 에서 서브버전 (Subversion) 설치하기

우선 svn과 아파치2의 svn module을 설치한다

sudo apt-get install subversion libapache2-svn

보통 module을 설치했을때 자동으로 활성화 되지만 활성화되었는지 확인한다.

sudo a2enmod dav_svn

svn을 설치할 디렉토리를 만들고 거기다 svn repository를 설치한다.

sudo mkdir /home/svn
sudo svnadmin create /home/svn

svn 디렉토리를 아파치 유저를 owner로 설정한다

sudo chown -R www-data /home/svn

웹서버에 svn을 설치하므로 비밀번호를 설정해줘야 한다. htpasswd 명령어에 -c를 더해 비밀번호 파일을 생성한다./

sudo htpasswd -c /etc/apache2/dav_svn.passwd username

유저를 더 하려면

sudo htpasswd /etc/apache2/dav_svn.passwd username2

아파치를 다시 시작한다.

sudo /etc/init.d/apache2 restart

, , , ,

No Comments

리눅스 하드 디스크 및 파티션 공간 알아보기

df 는 리눅스에 설치된 하드 드라이브의 모든 파티션을 보여준다

df -hT

Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/sda1     ext3    327M  133M  178M  43% /
tmpfs        tmpfs   1008M     0 1008M   0% /lib/init/rw
udev         tmpfs     10M  720K  9.3M   8% /dev
tmpfs        tmpfs   1008M     0 1008M   0% /dev/shm
/dev/sda9     ext3    280G  190G   76G  72% /home
/dev/sda8     ext3    373M   11M  343M   3% /tmp
/dev/sda5     ext3    4.6G  2.6G  1.8G  60% /usr
/dev/sda6     ext3    2.8G  1.4G  1.3G  51% /va

참고로 du 는 현재 디렉토리의 모든 파일 크기를 보여준다.

du -ah

4.0K    ./index.php
4.0K    ./index.php~
4.0K    ./index.html
16K     .

1 Comment