Archive for category IT

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

데비안 (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     .

No Comments

아이폰으로 워드프레스 하기

아이폰 애플리케이션으로 워드프레스에 포스팅 할 수 있다.

지금 아이폰으로 이 포스트를 올리는 중이다.

우선 앱스토어에서 무료 워드프레스를 다운로드하여 설치한다.

블로그 주소와 아이디, 비밀번호를 입력하면 바로 포스팅을 시작 할 수 있다.

사진도 같이 올릴수있는데 따로 올려야 하는게 흠이지만 컴퓨터를 이용 할 수 없는 상황에서 아이폰으로 간단하게 포스트를 올릴 수 있는 장점이있다.

,

No Comments