2008년 10월 20일 월요일
[Tip] How to create a New User on Windows Server 2003
Windows Server 2003의 경우 새로 설치하고 나면 사용자는 Administrator뿐이다.
Terminal Services를 사용하지 않고자 하거나, 이 Server를 이용하는 다른 사용자가 없다고 하더라도, 새로이 User를 추가하는 것은 유용하다.
아래 Link의 저자가 추천하는 것은 Administrator외에 추가로 2명의 User를 더 생성하는 것이다.
하나는 직접 Administrator Account에 로그인하는 것을 피하기 위한 "Administrators" group의 한 구성원이면서, 어쩔 수 없이 Administrator로 로그인해야만 하는 상황에 사용하기 위한 사용자이다.
또 다른 하나는 "Users" group의 한 구성원이다.
UNIX에서와 같이 오직 이 Regular User로서만 로그인하고, Administrator로서 Program을 실행할 필요가 있을 때에는 "runas" Command를 사용하기를 권고하고 있다.
Windows Server에서 관리자가 이런 환경에서 작업하는 것은 상당히 불편하므로 이 권고를 그대로 따르지는 않겠지만, 적어도 Administrator Account를 그대로 사용하는 것만은 바람직하지 못하다.
임의로 "Administrators" group에 속하는 사용자를 새로이 생성하여 사용하고 Administrator Account를 비활성화하는 것이 내가 택한 절충안이다. 당연한 말이지만 이런 식으로 조금 더 편리함을 도모할수록 보안상의 위험성이 높아진다는 것을 명심할 필요가 있다.
Control Panel에는 새로운 사용자를 생성하기 위한 Shortcut이 제공되지 않는다.
새로운 사용자 생성은 Local User and Groups snap-in (Start menu - Run - lusrmgr.msc)을 통해 가능하다.
[Tip] Deactivate the Shutdown Event Tracker + Set Interactive logon: Do not require CTRL+ALT+DEL
- Computer Configuration
- Administrative Templates
- System
[Display Shutdown Event Tracker]항목을 "disabled"로 설정.
- Computer Configuration
- Windows Settings
- Security Settings
- Local Policies
- Security Options
[Interactive logon: Do not require CTRL+ALT+DEL]항목을 "enabled"로 설정.
2008년 9월 12일 금요일
[Tip] Linux/Unix에서 압축파일 다루기
물론 zip이나 rar 또는 7zip과 같은 압축파일형식은 Platform에 구애받지 않고 사용될 수 있고 실재로 많이 사용되고 있기는 하지만, Linux/Unix에서 가장 자주 만나게 되는 압축파일은 filename.tar.gz 와 filename.tar.bz2와 같은 형식이다.
(최근의 Data Compression Software들은 다양한 format을 지원하고 있기 때문에 tar.gz나 tar.bz2 등도 적절한 Windows Utility를 사용하면 MS Windows에서 사용하는 데 큰 어려움은 없다.)
Kernel Source라든지 Application들의 Source Package들도 주로 이 두가지 형식으로 배포된다.
이러한 압축파일들은 tar 명령과 gzip, bzip2와 같은 Utility들을 이용하여 만들어질 수 있다.
===| TAR |=======================
TAR는 UNIX의 standard archive utility로서 원래 Tape ARchiving program에서 유래하였다.
지정된 여러 개의 file들을 archive라고 부르는 하나의 file로 만들거나, 하나의 archive에 모아져 있는 여러 개의 file을 원래의 형태대로 추출해내는 UNIX SHELL command이다.
tar archive에는 ".tar"라는 확장자가 붙는다. tar archive 내에 들어있는 file들은 압축되는 것이 아니라, 단지 하나로 모아지는 것뿐이다. 흔히 tar로 묶어진 archive를 "tarball"이라 부르기도 한다. 이러한 tar archive를 gzip이나 bzip2로 다시 압축한 것이 archive-name.tar.gz와 archive-name.tar.bz2이다.
$ tar cvf backup.tar /home/jvm
이 명령은 /home/jvm 안의 모든 file을 backup.tar의 이름으로 묶는다. 첫 번째 argument인 "cvf" 는 tar의 option으로서, "c"는 새로운 file을 생성(create)하며, "v"는 명령이 수행되는 세부 process를 화면에 출력될 것을 지정한다(verbose). "f"는 생성될 file의 이름을 다음에 나오는 argument인 backup.tar로 지정한다(file). 마지막 argument는 압축이 될 file이나 directory이다.
# tar xvf backup.tar
current directory의 backup.tar를 푼다(extract). tar로 묶인 것을 풀 때 기존의 file들을 덮어쓰게 되므로 주의를 요한다. backup.tar가 directory를 포함한다면, 자동적으로 directory가 생성되고 file이 속하게 된다.
===| compress |=======================
근래에는 잘 사용하지 않는 compress의 경우 가장 먼저 나와서 가장 오랫동안 사용되었으나, algorithm에 대한 Software License 문제와 gzip의 효율이 compress 보다 좋다는 점, 그리고 gzip으로도 compress를 이용해 압축된 file을 다룰 수 있다는 등의 이유로 gzip(GNU Zip)으로 대치되었다.
compress로 압축된 file의 끝에는 확장자 .Z가 붙는다. 예를 들면,
$ compress backup.tar 라는 명령으로 backup.tar를 compress를 사용해 압축하면 backup.tar.Z이 만들어진다.
압축을 해제할 때에는 다음과 같이 uncompress를 이용한다.
$ uncompress backup.tar.Z 해주면 backup.tar가 풀려나온다.
===| GZip |=======================
GNU Zip(gzip)은 compress 명령보다 더 나은 Data Compression기능을 갖고 있으며 주로 tar로 묶여진 archive를 다시 압축할 때 사용하게 된다.
압축파일에는 ".gz"라는 확장자가 붙는다.
$ gzip -9 backup.tar 와 같이 명령을 주면 최상의 압축률(-9)로 backup.tar를 압축한 backup.tar.gz가 만들어진다.
이것을 Pipe와 Redirection을 사용하여
$ tar cvf - /home/jvm | gzip -9c > backup.tar.gz 와 같이 해주어도 된다.
(먼저 tar file을 tar의 표준출력(-)으로 보내고, 이것은 gzip과 pipe되어 들어오는 tar file을 압축하여 그 결과를 backup.tar.gz로 redirect시킴으로써 file로 저장된다. gzip의 -c option은 출력을 redirect하기 위해 표준출력으로 보낸다.)
압축을 해제하기 위한 명령은 gunzip이다. 이것은 gzip -d와 동일하다.
$ gunzip backup.tar.gz 명령을 통해 backup.tar가 풀려나오고,
$ tar xvf backup.tar 해주면 archive가 풀려진다.
이 두 명령을 한 번에 하려면
$ gunzip -c backup.tar.gz | tar xvf - 와 같이 하면된다.
(gunzip은 bacup.tar.gz의 압축을 해제하고, 그 결과를 표준출력으로서 tar에 보낸다. -는 tar의 표준출력.)
이제 흔히 볼 수는 없지만 확장자가 .taz이거나 .tgz인 archive들을 어디선가 만날 수 있다.
Linux/Unix에서는 file을 하나의 archive로 인식하기 위하여 어떤 특정한 확장자를 꼭 붙여줄 필요가 없다. 단지 알아보기 편하도록 tar로 묶으면 확장자 .tar를 붙이고, 이것을 압축하면 .tar.Z나 .tar.gz와 같은 확장자가 붙게 된 것이다.
그렇지만 MS-Dos System에서는 이러한 이중확장자를 사용할 수 없었기 때문에 .tar.Z와 동일한 .taz확장자와 .tar.gz와 동일한 .tgz가 사용되었다. 이러한 압축을 푸는 방식은 물론 .tar.Z와 .tar.gz와 동일하다.
===| bzip2 |=======================
bzip2는 Lossless Data Compression Algorithm으로 Burrows-Wheeler Transform(Block-Sorting Compression)을 써서 자주 반복되는 Character String을 같은 Character String로 변환한 다음 MTF(move-to-front) Transform, Huffman Coding을 차례대로 적용하는 구조이다. gzip이나 zip에 비해 압축률이 좋지만 느리다.(13MByte 정도 크기의 text file을 압축하면 354kByte가 되었다고 하니 놀랄만한 압축률이다.)
bzip2 자체적으로는 다중파일을 다루거나 분할압축, 암호화 등의 기능이 없다. 그러한 기능은 tar와 같은 다른 Utility가 대신하게 된다. 특징이나 사용할 수 있는 option은 gzip과 거의 같다.
압축파일에는 ".bz2"라는 확장자가 붙는다.
$ bzip2 backup.tar 와 같이 명령을 주면 backup.tar를 압축한 backup.tar.bz2가 만들어진다.
이것을 Pipe와 Redirection을 사용하여
$ tar cvf - /home/jvm | bzip2 > backup.tar.gz 와 같이 해주어도 된다.
bzip2는 압축만 할 수 있고 archive 기능은 가지고 있지 않다.
또한 위에서 다중파일을 다루지 못한다고 하였는데 여러 file들을 각각 동시에 압축하는 것은 가능하다.
예를 들어 file1, file2, file3 가 있는 directory에서
$ bzip2 * 와 같이 명령을 주면 file1.bz2, file2.bz2, file3.bz2 가 생성된다.
$ bunzip2 * 해주면 file1, file2, file3가 동시에 풀려져 나온다.
압축을 해제하기 위한 명령은 bunzip2이다. 이것은 bzip2 -d와 동일하다.
$ bunzip2 backup.tar.gz 명령을 통해 backup.tar가 풀려나오고,
$ tar xvf backup.tar 해주면 archive가 풀려진다.
이 두 명령을 한 번에 하려면
$ bunzip2 -c backup.tar.gz | tar xvf - 와 같이 하면된다.
[Tip]
BSD와 GNU Version tar는 compress와 gzip압축을 다룰 수 있는 option(Z / z)와
bzip2압축을 다룰 수 있는 option(j)가 patch되어 있다.
따라서 pipe를 사용하지 않고 한 번의 명령으로 압축이나 해제를 할 수 있다.
$ tar czvf archive-name.tar.gz * 라고 하면 하위 디렉토리를 포함한 모든 파일을 tar로 묶어서(.file은 제외) gzip으로 압축하라는 의미이다.
(Z option에 archive-name.tar.gz 대신에 archive-name.tar.Z를 사용하면 compress로 압축.)$ tar xzvf archive-name.tar.gz와 같이 z option을 사용하여 tar.gz을 한 번에 압축해제 가능.
(Z option에 archive-name.tar.gz 대신에 archive-name.tar.Z를 입력하면 compress 압축해제.)
하위 디렉토리를 포함한 모든 파일을 tar로 묶어서(.file은 제외) bzip2로 압축하려면
$ tar cjvf archive-name.tar.bz2 *
tar.bz2를 한 번에 압축해제 시키려면결론적으로 여러 Data Compression Software들이 있지만 tar 하나만 잘 활용하면 .tar, .tar.Z, .taz, .tar.gz, .tgz, .tar.bz2 와 같은 확장자를 가진 모든 압축파일을 문제없이 사용할 수 있다.
$ tar xjvf archive-name.tar.bz2
<추가>
tar의 info page를 찾아보다가 그동안 정확히 알고 있지 못하던 내용을 새로이 보게되어 추가한다.
tar에서 option을 주는 방법은 Long option / Short option / Old style option 세가지가 있다.
--verbose 이렇게 사용하는 것은 Long option,
-v 이렇게 쓰는 것은 Short option이고 Old style option은 Short option과 마찬가지로 Single letter이다.
그러나 단독으로 사용할 수는 없고 공백없이 option letter들을 붙여쓴다.
위에서 tar에 대한 예로서 사용한 명령들은 다 Old style option을 사용하였다.
tar --create --file=archive.tar file1이 세 명령은 모두 동일하다. 그렇지만 조심해야할 경우가 있다.
tar -cf archive.tar file1
tar cf archive.tar file1
tar -cfz archive.tar.gz file1이 두 명령은 전혀 다르다. Old style option의 경우 f option에 대한 value로서 archive.tar.gz를 사용하고,
tar cfz archive.tar.gz file1
gzip압축을 위한 option으로서 z를 인식하게 된다. 이와 같은 기대를 하고 tar -cfz archive.tar.gz file1 을
사용하면 전혀 의외의 결과를 얻게된다. 왜냐하면 이 경우 z가 f option에 대한 value로 받아들여져 버리기
때문이다. 하지만 다음과 같이 사용함으로써 이 문제를 피할 수 있다.
tar -czf archive.tar.gz file1Old style option은 구버전의 tar와의 호환성을 위해 유지되고 있다.
tar -cf archive.tar.gz -z file1
tar cf archive.tar.gz -z file1
Long option의 경우 단어 자체를 사용하므로 직관적이나 길어서 불편하다.
개인적으로는 Old style option이 편하긴 하지만 아무래도 Short option 형태를 사용하는 것이 나을 것도 같다.
다만 f option의 경우처럼 value가 바로 따라오는 syntax를 가진 경우를 조심해야한다.
2008년 9월 11일 목요일
2008년 7월 11일 금요일
YouTube Video Quality Investigation
http://www.youtube.com/watch?v=U6KoEfczGEo 에서 공급한 동영상 소스
<param name="movie" value="http://www.youtube.com/v/U6KoEfczGEo&hl=en&fs=1"></param>
<param name="allowFullScreen" value="true"></param>
<embed src="http://www.youtube.com/v/U6KoEfczGEo&hl=en&fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed>
</object>
more..
DoA님께서 블로그에 올리신 소스
<param name="movie" value="http://www.youtube.com/v/U6KoEfczGEo">
<embed src="http://www.youtube.com/v/U6KoEfczGEo" type="application/x-shockwave-flash" width="480" height="360"> </embed>
</object>
more..
http://www.youtube.com/watch?v=U6KoEfczGEo&fmt=18 에서 capture.
수정된 고화질용 소스
<param name="movie" value="http://www.youtube.com/v/U6KoEfczGEo&fmt=18"></param>
<param name="allowFullScreen" value="true"></param>
<embed src="http://www.youtube.com/v/U6KoEfczGEo&fmt=18" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed>
</object>
/** 고화질 요청이 적용되지 않음. **/
DoA님께서 블로그에 올리신 고화질용 소스
<param name="movie" value="http://www.youtube.com/v/U6KoEfczGEo&ap=%2526fmt%3D18">
<embed src="http://www.youtube.com/v/U6KoEfczGEo&ap=%2526fmt%3D18" type="application/x-shockwave-flash" width="480" height="360"> </embed>
</object>
/** 고화질 요청이 적용되었음. **/
제목처럼 거창한 작업은 아니지만 나름대로 상당히 번거로운 포스팅이 되고 말았다.
위에서 알 수 있듯이 http://www.youtube.com/watch?v=U6KoEfczGEo&fmt=18 를 통해 고화질 비디오를 보는 것은 가능하였으나 동영상 소스 삽입은 동작하지 않았다.
이러한 현상이 일부 비디오에 해당하는 문제인지 전체 YouTube에 해당하는 문제인지는 아직 알 수 없다.
예전에 블로그에 올린 YouTube 비디오들은 다 사전에 두 버전을 비교해보았었기 때문에 당연히 작동한다고 믿고 있었던 것이 잘못된 것이었다.
2008년 6월 28일 토요일
[Link] High Quality on Youtube
Youtube has slowly started to create better quality versions of many videos, adding links that say, "Watch this video in higher quality." See this High Quality example and compare it to Youtube's Normal Quality.
..... more in Jimmy Ruska's Blog
+
How to Embed High Quality and Higher Resolution YouTube Videos on Blog or Website
2008년 5월 30일 금요일
[Tip] CD1장짜리 통으로 된 Monkey's Audio APE를 각 track별로 나누기
MP3, OGG와 같은 손실 압축 코덱(lossy compression)과는 달리, 원본 웨이브폼과 똑같은 웨이브폼을 재현한다. 그러므로 Data 크기는 줄어들지만 음질저하가 일어나지 않는다.
Monkey's Audio의 파일들은 확장자 .ape를 쓴다.(ape는 원숭이, 유인원)
WinAmp나 Nero Burning Rom 등의 프로그램들이 Plug-in을 통해 Monkey's Audio를 지원하기는 하지만 아무래도 각 track별 mp3-format으로 있는 편이 사용하는데 훨씬 편리한 것이 사실이므로 무료로 구할 수 있는 Utility EAC를 활용하여 변환 해보기로 한다.
아래의 작업을 위해서는 우선 작업하는 Computer에 Monkey's Audio가 설치되어 있어야 한다.
Monkey's Audio-format으로 압축되어 배포되는 음반은 "filename.ape","filename.cue"와 같이 ape와 cue 두 개의 file로 구성되어 있다. 통째로 변환만 한다면 cue file은 없어도 상관없으나 track별로 나누기 위해서 필요하다.
예로 보이기 위해 사용될 음반은 다음과 같다.
원래 2 Disk Release이지만 그 중 CD1만 사용하기로 한다.
cdimage.ape + cdimage.cue 이 두개의 file이 준비되어있다.
1. 제일 먼저 Exact Audio Copy(EAC)를 이용, cdimage.ape의 압축을 해제하여 wav-format으로 만든다.
- EAC를 실행, Tools - Decompress를 선택하면
ape file을 선택할 수 있는 창이 나온다. cdimage.ape를 선택해주면 된다.
output filename은 자동으로 cdimage.wav가 되므로 따로 입력할 필요는 없다.
- 기존의 cue file은 cdimage.ape가 Source로 지정되어 있으니 이것을 앞의 과정에서 얻은 cdimage.wav로 수정해 준다.
PERFORMER "Johann Sebastian Bach"
TITLE "The Cello Suites - Inspired by Bach - Yo Yo Ma - Disk 1"
FILE "cdimage.wav" WAVE // <==== Edit this line!!
TRACK 01 AUDIO
..........
3. 이제 다시 EAC를 이용하여 위에서 얻은 wave file을 track별로 분할한다.
- EAC를 실행, Tools - Split WAV by CUE sheet - With Gaps를 선택하면
wav file을 선택할 수 있는 창이 나온다. cdimage.wav를 선택해 준다.
다음으론 cue file을 선택할 수 있는 창이 나온다. cdimage.cue를 선택해 준다.
4. 위의 과정을 통해 track별로 분할된 wav file들이 얻어졌다.
다시 EAC를 이용하여 이것들을 mp3-format으로 압축할 수 있다.
물론 사전에 EAC의 Compression 설정을 해두어야 한다.
- EAC를 실행, Tools - Compress
Monkey's Audio FAQ
Q: How to convert between APE and WAV ?
A: Get install package at Monkey's Audio download page.
Q: Where to get Winamp plug-in to play APE?
A: Winamp 5 plug-in comes with main download.
Q: I have a large APE file and CUE sheet - how do I split into separate tracks?
A: Decompress APE to WAV; use EAC and go to menu item "Tools" > "Split WAV by CUE sheet"
Q: Big APE and CUE sheet - how to burn to audio CD?.
A: Using EAC click the large "WRI" button to get the CD Layout Editor;
then select "File" > "Open CUE sheet or Layout" and
select the CUE sheet; finally select "CD-R" > "Write CD".
Q: Big APE and CUE sheet - burning with EAC fails with an error?
Q: Big APE and CUE sheet - MakeAPL fails to process?
A: Open the CUE sheet using Notepad and check the line that appears something like:
FILE "Artist Name - Album Name.wav" WAVE
Edit the 3 letters from "wav" to "ape" and save the CUE sheet.
Q: When attempting to re-encode APE files (to newer version or higher compression) Monkey's Audio returns an error?
A: To re-encode APE files select "Convert" mode.
Q: I selected Convert but it skips all the files!
A: Go to "Options" > "Output" and choose one of the following methods:
1: "If Output File Exists" select either "Rename" or "Overwrite"
2: Set "Output Location" to "Output to a specific directory"
Q: APE file stops playing/decompressing on error - now what?
A: To play in WinAmp" configure the Monkey's Audio plug-in to "Ignore bitstream errors" to play.
A: To decompress do the above, set "Output" to "Nullsoft Disk Writer" and
configure the desired output directory files.
(NOTE: Remember to change the Output plug-in back to WaveOut or DirectSound afterwards.)
Q: How to configure EAC to rip using Monkey's Audio?
A: In EAC go to menu: EAC > Compression Options. Choose one method:
1: Under "Waveform" change the "Wave format" drop-down to "Monkey's Audio Lossless Encoder" and choose compression method.
2: Under "External Compression" check the box "Use external program for compression", set "Parameter passing scheme"
to "Monkey's Audio Lossless Encoder".
Browse button for the file MAC.EXE (found in the Monkey's Audio installation directory), and set your compression level.
Q: How to use the external compressors?
A: First, select "Compress" if source files are WAV, or "Convert" if source files are APE, WV, SHN, RKA or MP3.
Then select/configure the chosen external compressor. Examples:
- LAME: Recommended LAME 3.90.3 arguments "--alt-preset standard" (entered without quote marks)
- OGG: Configure using quality switch "-q 5" (entered without quote marks)
Note on MPEGPlus: current versions may not fully supported in Monkey's Audio.
However, you can get the default --standard profile if no arguments are given.
2008년 5월 22일 목요일
Tipps: Höheres Tempo auch ohne n-Draft
[Quelle] CHIP GO DIGITAL Ausgabe 01/2007
Es muss nicht gleich ein neues n-Draft-Gerät her - so machen Sie such Ihnen vorhandenen Router deutlich schneller.
Tuning-Firmware aufspielen: Wer versteckte Leistungsreserven seines Routers abrufen will, muss eine neue, meist herstellerfremde Firmware aufspielen. Der aufgepeppte Router bietet dann mehr Reichweite, Tempo und Sicherheit. Über 20 aktuelle 802.11g-Router lassen sich tunen; eine Liste kompatibler Router und Firmware finden Sie auf www.dd-wrt.com oder www.openwrt.org . Die alternative Firmware wird wie ein reguläres Firmware-Update installiert.
Achtung: Installieren Sie das Upgrade nur, wenn Sie sich mit Routern auskennen. Sollte es schief gehen, müssen Sie das Gerät in der Regel zum Hersteller einschicken.
W-LAN-Reichweite ausbauen: Die Sendeleistung ist ab Werk oft zu gering, obwohl die Router mehr können. Linksys etwa beschränkt die Leistung auf 28 mW, obwohl in Deutschland 100 mW zugelassen sind. Die neue Firmware entfesselt den Router. Sie können seine Leistung nun von 0 bis 251 mW regeln.
Achtung: Auch wenn es möglich ist - die gesetzliche Obergrenze von 100 mW dürfen Sie nicht überschreiten.
W-LAN-Performance erhöhen: Wollen Sie nur ein bis drei Clients im W-LAN-Netz verbinden, können Sie die Leistung mit "Frameburst" erhöhen. Dann passen mehr Daten durch die "Funkleitung".
Hintergrund: Nach jedem Datenpaket sprechen sich die Sender ab, wer als Nächstes Daten übertragen darf. Im Frameburst-Modus wartet der Sender nicht, sondern schickt die Daten ohne zu fragen.
2008년 3월 22일 토요일
[Tip] Using Google for searching ebooks
Go to Google's search page and use the following criteria in the search dialog
e.g.
This will hopefully give you a listing of all websites that google has cached that contain references to files in CHM format that are published by SYNGRESS.
---------------
for searching ebooks
or
2008년 2월 5일 화요일
USB Stick을 부팅가능하게 만들어 BootCD의 대용으로 사용해보자
[출처] EFB.nu freeware's home (Autor N0rdLicHt)
[번역 & 수정] JVM
USB Stick을 부팅가능하게 만들고, 또한 동시에 남은 공간들은 저장소로서 계속 사용하려면?
준비물:
1 USB Stick
USB Stick으로부터 부팅하고자하는 CD/DVD (여기에서는 Hiren's Boot CD 9.3)
Freeware-도구들:
"HP USB Disk Storage Format Tool"
Download : http://www.chip.de/downloads/USB-Disk-Storage-Format-Tool-2.0.6_23418669.html
"Bart's Boot Image Extractor"
Download : http://www.nu2.nu/bbie/
"Extract"
Download : http://www.winimage.com/extract.htm
절차:
1. 우선 Memory Stick이 비어있거나 모든 Data를 제대로 백업해두었는 지 확인.
2. 준비된 CD/DVD를 드라이브에 넣고 "Bart's Boot Image Extractor"를 사용해 CD/DVD의 Bootimage를 추출해낸다.
BBIE가 있는 directory에서 명령창을 열고 "bbie.exe x:"와 같이 입력하고 Enter해주면 이 directory 안에 Bootimage가 추출된다.
(여기에서 x는 해당 CD/DVD가 들어있는 드라이브명)
3. 다음으로 Bootimage 안의 모든 Data들을 풀어내야한다. 명령창에서 "Extract"의 -e 또는 -x 옵션을 사용하면 된다. 즉, "extract.exe -e bootimage.bin".
주의:
만약 우연히 풀려져야할 Data들 중 extract.exe라는 이름을 가진 것이 있다면, "Extract"의 실행파일 이름을 바꿔줘야만 한다. 예를 들면 lala.exe와 같이 이름을 변경하고 다음과 같은 명령으로 Bootimage를 풀어 준다. "lala.exe -e bootimage.bin"
(위의 작업에서 추출된 Bootimage 안에는 extract.exe라는 이름을 가진 파일이 포함되어 있다. 그러므로 이 작업을 위해서 반드시 extract.exe의 이름을 변경해 주어야만 한다.)
4. 다음으로 "HP USB Disk Storage Format Tool"을 실행하여 "Device" 항목에서 USB Stick을 선택, "File system"은 FAT, "Volumelabel"은 임의로 단순하면서도 짧은 것(알아보기 쉬운 것!)으로 지정한다. 그리고 나서 "Create a DOS Startup Disk"에 체크해주고 "using DOS system files located at"을 선택한다. 여기에서 앞서 추출한 Bootimage를 풀어 둔 directory를 선택해준다. 그 다음 "Start"를 클릭.
이로써 거의 다 된 셈이다.
이제 BootCD의 모든 내용물을 USB Stick의 Root directory로 복사한다.
"Hirens Boot CD"가 하나의 메뉴로서 자동적으로 시작되도록, 앞서 추출한 Bootimage를 풀어 둔 directory 안의 모든 Data를 USB Stick의 Root directory로 복사한다. 여기에는 이미 HP USB Format Tool의 의해 만들어진 Data들이 있으므로 같은 이름의 파일들을 덮어쓸 것인지에 대해 물어오게 된다. 모든 파일을 덮어쓰도록 하면 이로써 작업은 완료된다.
5. 이제 다음 재시작 때 BIOS 설정에 들어가 USB Device를 첫 번째 부팅장치로 지정해준다.
이렇게 해서 USB Stick으로 부팅을 하게 되면 모든 것이 BootCD로 부팅했을 때와 동일하나 한 가지 다른 점은 여기에서는 CD에서처럼 Harddisk로 부팅할 지 BootCD로 부팅할 지 선택하는 메뉴가 나타나지 않는다는 점이다. 그 대신 곧바로 BootCD의 선택메뉴가 나타난다.
USB Stick으로 부팅시키지 않고 Windows 상에서 사용하면 BootCD에 사용된 공간을 제외한 나머지는 지금과 같이 Data 저장장소로서 계속 이용할 수 있다.(Hiren's BootCD는 약 80 MB 정도의 공간을 차지한다.)
아래에 비슷한 내용의 Article이 더 있다.
Hiren's BootCD From USB Flash Drive
How to Put Hiren's BootCD auf Flash-Speicher
[Related Article]
2008/02/02 - [Miscellaneous] - USB Stick bootfähig machen nur mit Freeware Windows-Tools
2008년 2월 2일 토요일
USB Stick bootfähig machen nur mit Freeware Windows-Tools
2008/02/05 - [Miscellaneous] - USB Stick을 부팅가능하게 만들어 BootCD의 대용으로 사용해보자
[Quelle] EFB.nu freeware's home (Autor N0rdLicHt)
Wie man einen USB Stick bootfähig machen kann und gleichzeitig auch noch als USB Stick Speicher weiter nutzen kann?
Vorraussetzungen:
1 USB Stick a xxxGB
Eine CD/DVD, welche man vom USB Stick booten möchte ( in diesem Fall Hirens Boot CD 9.3 , welche ja nicht gerade "free" ist, aber in diesem Fall wollte ich es damit ausprobieren, es gibt ja noch jede Menge anderer BootCDs, von denen viele ja auch wirklich Free oder OpenSource sind )
Freie Tools:
Das Tool "HP USB Disk Storage Format Tool"
Download z.B. hier : http://www.chip.de/downloads/USB-Disk-Storage-Format-Tool-2.0.6_23418669.html
Das Tool "Bart's Boot Image Extractor"
Download hier : http://www.nu2.nu/bbie/
Das Tool "Extract"
Download hier : http://www.winimage.com/extract.htm
Vorgehensweise:
Zunächst bitte sicherstellen , dass der Stick leer ist bzw. von allen Daten, die sich ev. noch dadrauf befinden, ein Backup angefertigt wurde !
Nun die CD/DVD, die man von USB Stick booten lassen möchte , in das Laufwerk legen. Dann das Bootimage von der CD/DVD mit Bart's Boot Image Extractor" rippen, indem man das Tool in ein Verzeichnis entpackt und von einem Konsolenfenster folgendes ausführt "bbie.exe x:" , wenn x: das Laufwerk ist wo sich die CD/DVD befindet.
Nun sollte sich das gerippte Bootimage im selben Verzeichnis befinden.
Als nächstes müssen wir alle Dateien aus dem Bootimage extrahieren. Ich habe mir dafür das Tool "Extract" von der Winimage Webseite besorgt. Zum Entpacken wählt man - im Konsolenfenster - die Option -e oder -x also z.B. "extract.exe -e bootimage.bin".
Anmerkung:
Sollte eine der zu extrahierenden Dateien zufällig auch extract.exe heißen, muss man extract.exe umbenennen , z.B. in lala.exe und dann das Bootimage mit "lala.exe -e bootimage.bin" entpacken.
Als nächstes startet ihr das Tool "HP USB Disk Storage Format Tool". Dort wählt ihr bei "Device" euren USB Stick aus, bei "File system" z.B. FAT, bei "Volumelabel" gebt ihr irgendetwas einfaches und kurzes ( zusammenhängendes! ) ein. Dann macht ihr ein Häkchen bei "Create a DOS Startup Disk" und wählt "using DOS system files located at". Dort wählt ihr nun das Verzeichnis aus, welches die Dateien enthält, die ihr aus dem gerippten Bootimage entpackt habt. Dann auf "Start" klicken.
Jetzt seid ihr im Prinzip fast fertig.
In meinem Fall hab ich jetzt noch den kompletten Inhalt der BootCD ins Root Verzeichnis des USB Sticks kopiert und da in meinem Fall die "Hirens Boot CD" automatisch mit einem Menü startet , habe ich nochmal manuell alle Dateien die sich in dem entpackten Bootimage Verzeichnis befinden, in das Rootverzeichnis auf den Stick kopiert. Bei einigen kommt die Meldung, ob man eine bereits vorhandene Datei überschreiben will ( das sind die Dateien welche vom HP USB Format Tool bereits auf dem Stick platziert worden sind - einfach ignorieren und alles nochmal rüberbügeln ).
FERTIG !!!
Nun beim nächsten Neustart im BIOS einstellen, dass zuerst vom USB Gerät gebootet werden soll und bingo es hat funktioniert. Es sieht alles so aus als würde ich von CD booten, einzig das allererste Bootmenü fehlt wo man auswählen kann ob man von der BootCD oder von der Festplatte booten will, stattdessen kommt gleich das Auswahlmenü der BootCD.
Wenn ich mir den USB Stick jetzt in Windows anschaue, mit "Eigenschaften", zeigt er weiterhin an, dass es sich um einen 2 GB USB Stick handelt und ich kann jetzt auch weiterhin den vorhandenen Restspeicherplatz voll nutzen ( die Hirens BootCD hat nur ca. 80 MB auf dem Stick eingenommen).
Hiren's BootCD From USB Flash Drive
How to Put Hiren's BootCD auf Flash-Speicher
2007년 11월 6일 화요일
[Tip][OpenSuSE10.3] Samba Configuration on KDE
KDE환경에서 Samba Server 설정하기 + SWAT
GSAMBAD와 같은 Samba Server를 위한 Frontend도 이미 나와 있기도 하고,
앞서 2007/06/05 - [Linux] - SAMBA 설정과 이용에서 언급했듯이 여러가지 방법이 존재한다.
(물론 어떠한 방법이든 내부에서 최종적으로 하는 일은 동일하다.)
여기서 보이려는 방법은 나의 경우에서 가장 간편하다고 생각된 방법이다.
1. Menu에서 Personal Settings를 선택한다.
2. Internet & Network를 선택한다.
3. 아래 쪽의 Samba를 선택한다.
4. Samba Server의 설정을 변경하려면 Administrator Mode를 선택해주어야 한다.
5. root password를 입력하고 계속한다.
6. Base Settings 항목이 나타난다. 원하는 대로 설정을 변경하고 apply를 누르면 적용된다.
또한 여기에서 보안레벨을 정하게 되는 데 각자 환경에 따라 적절한 것을 선택한다.
나의 경우 가장 일반적인 보안정책으로 생각되는 User를 선택하였다. (이렇게 하면 Samba Server에 접속하는
이용자는 Server에 등록된 id와 password를 입력해야만 접속할 수 있다.)
7. Shares항목에서는 공유되고 있는 목록을 보여준다. 목록의 기존공유를 편집하거나 새 공유 추가, 공유제거 등
의 작업을 할 수 있다.
8. Samba를 사용할 사용자를 등록한다.
9. DOS charset을 CP949로 바꾸어 주었다.(CP949는 euc-kr을 포함하는 MS의 확장완성형 문자 인코딩)
10. 부팅시 Samba를 기동시키기 위하여 Runlevel을 수정한다.
11. smb와 nmb service가 활성화되어야 한다.
12. SWAT는 xinetd를 통해 구동되게 된다.
만약 Firewall이 기동되어 있다면 Samba Server를 위한 Port를 열어 주어야 한다.
위 그림에 보이는 Samba Server 항목(이 안에서 여기서 설명하고 있는 대부분의 과정을 설정할 수도 있다.)에
들어가면 Firewall Settings에서 Port 열어주도록 할 수 있다.
또한 여기의 Service Start항목을 통하여 10과 11의 과정을 간단하게 설정할 수도 있다.
13. swat service를 활성화 시킨다.
14. SWAT가 구동되면 웹브라우저에 http://localhost:901이라 입력하여 불러올 수 있다.
(User Name과 Password를 물어오는 데 기본적으로는 root로 login한다.)
15. SWAT에 접속한 화면이다.
16. GLOBALS 항목에서 앞서 설정했던 내용들을 볼 수 있다. 물론 여기에서 새로이 설정할 수도 있다.
기왕에 SWAT을 사용할 거라면 위에서 설명한 3~9까지의 과정은 이곳에서 설정해도 된다.
다만 아주 간단한 설정을 위해서라면 SWAT가 필요하지 않을 수도 있을 것이다.
17. Username/Password를 등록한다. (다른 컴퓨터에서 이 Samba Server에 접속할 때 사용할 정보이다.)
18. Samba Server가 service되고 있는 상태를 볼 수 있다.
설정 변경 후 여기에서 smbd/nmbd를 재시작 해줄 수 있다.
19. 동일한 네트워크에 위치하고 있는 Windows에서 네트워크 환경에 들어가면 아래와 같이
Samba Server에 의해 공유되고 있는 자원을 볼 수 있다.
실제로 사용하려면 17에서 설정한 정보를 사용하면 된다.
꼭 이렇게 하지 않아도 GUI환경에서 Samba Server를 필요에 맞게 설정할 수 있는 방법은 여러가지가 있다.
편리한 것을 선택하는 것은 사용자의 몫이다. SWAT만으로도 Samba Server설정에 관한 모든 것을 할 수 있다.
그러나 기본적으로 설정파일을 수정하고 console에서 필요한 service들을 구동시키는 작업을 한 번쯤은 해보고
GUI도구를 사용할 것을 권하고 싶다. 설정파일 안에 있는 내용들을 전혀 이해하지 못하는 상태에서 GUI도구가
제공해주는 편리한 기능을 제대로 사용할 수가 없기 때문이다.
[Related Article] 2007/06/05 - [Linux] - SAMBA 설정과 이용
2007년 10월 14일 일요일
[Tip] Google CSE를 이용해 블로그 내부검색하기
블로그에 글이 많이 쌓이다보면 블로그 내부검색 기능은 꼭 필요한 기능 중 하나이다.
티스토리나 태터툴스와 같은 경우는 자체 내부검색 기능이 제공되므로 편리하다.
그렇지만 친구들의 블로그를 함께 검색하고 싶다거나,
내부검색 기능이 부족한 서비스형 블로그를 사용하고 있다면 Google CSE 서비스가 참 유용하다.
QAOS.com의 DoA님의 Tip(구글 맞춤검색(CSE: Custom Search Engine) 활용하기)을 이용하면
CSE를 이용하여 블로그의 검색기능을 몇배나 강화할 수 있다.
친구 블로그 검색이나 검색결과의 라벨링과 같은 더 나은 기능을 활용하기 위하여
이 블로그도 위의 Tip에 따라 티스토리의 검색창을 CSE 검책창으로 대치하였다.
조인스 블로그에 있는 송원섭의 피라미드에 자주 들리는 편이다.
그곳의 주인장께서 자체적으로 지원되지 않는 블로그 내부검색 기능의 부재를 아쉬워하셔서
Google CSE를 이용하는 방안을 궁리해보았다.
결론적으로 나의 지식으로는 조인스 블로그에 Google CSE의 검색창을 달도록 할 방법을 찾지 못했다.
그렇다고 해도 서비스 자체를 이용할 수 없는 것은 아니므로 다음의 Tip을 작성하였다.
구글 CSE를 이용하여 자신의 블로그 검색하기
2007년 10월 9일 화요일
[Tip] Bootsector 복사
Windows 2000 이후의 MS Windows와 Linux를 하나의 System에 함께 설치하여 사용해야할 필요가 있을 수 있다.
Windows의 NTLoader와 Linux의 GRUB은 모두 Multiboot 환경을 지원하는 Bootloader이므로, 어느 것으로든 Multiboot환경의 Main Bootloader를 삼을 수 있다.
더 간단한 쪽은 GRUB을 Main Bootloader로 사용하는 것이다.Windows가 이미 설치되어 있는 System에 Linux를 설치하고 GRUB을 MBR에 심어 Main Bootloader로 사용한다면 특별히 손을 봐줘야만 하는 작업은 거의 없다. 자동으로 Multiboot 환경이 GRUB에 구현된다. 세부설정만 입맛에 맞게 수정해주면 족하다. 만약 반대의 순서로 설치한다면 NTLoader가 MBR을 덮어쓰면서 GRUB의 설정이 날아간다. 따라서 이 경우는 차후에 GRUB을 다시 MBR에 복원하는 작업이 필요하다.(참고: SuSE Rescue System을 사용하여 GRUB복구하기)
만약 Windows NTLoader를 Main Bootloader로 사용하고자 한다면 약간의 수작업이 필요하다.
여러가지 경우의 수가 있지만 Linux를 설치하면서 GRUB은 MBR에가 아니라 Boot Partition에 설치하기만 한다면 어느 운영체제를 먼저 설치하느냐는 상관이 없다. 다만 두 운영체제의 설치가 끝난 다음 Linux의 bootsector를 복사해 NTLoader에 붙여주면 된다.(이렇게 한 줄로 써놓았지만 현재 MBR에는 Windows Entry만 있는 NTLoader가 자리잡고 있는 상황이므로, 설치된 Linux로 들어가서된 bootsector를 복사하고 그것을 다시 Windows로 가져오는 것은 약간 번거로울 수 있다. 우선은 설치시디를 이용해서 부팅해 들어간 다음 작업을 해야할 것이다. bootsect.lnx를 가져오는 작업은 Windows로 재부팅하여 Ext2 IFS for Windows를 이용하면 편리하다.)bootsector를 복사하는 명령은 다음과 같다.
# dd if=/dev/hda7 of=/bootsect.lnx bs=512 count=1이렇게 복사한 bootsect.lnx를 Windows의 C:\로 복사해주고 다음의 방법으로 Windows Bootloader에 붙여준다.
//**root권한이 필요하다. /dev/hda7는 Linux의 boot partition.**//
boot.ini의
[operating systems] 항목 마지막 줄에
C:\bootsect.lnx="Linux" 추가.
2007년 9월 28일 금요일
[Scrap] 리눅스 서버의 보안설정
일반적인 시스템 보안 설정 및 최적화
리눅스베이 (master@ilinuxbay.com) | 2003.08.10
▮ root 접속시간 설정
/etc/profile에 "TMOUT=300" 으로 초단위 접속 시간을 설정한다.
설정 시간 동안 아무 작업도 하지 않으면 자동 로그아웃 된다.
▮ /etc/securetty
이 파일은 root가 로그인할 수 있는 터미널 장치(TTY)와 가상 콘솔(VC)을 정의 한다.
login 프로그램은 이 파일을 참조하여 프로세스를 처리한다.
사용하지 않을 장치에 한하여 삭제하거나 주석 처리한다. 그러면 root는 해당 장치로 로그인 할 수 없을 것이다. 추천사항으로 하나의 vc/1과 tty1만을 허용하는 것을 추천한다.
▮ Ctrl-Alt-Del 키를 사용한 부팅 막기
/etc/inittab 파일의 다음 부분을 주석 처리한다
ca::ctrlaltdel:/sbin/shutdown -t3 -r now
▮ /etc/service 파일
[root@ezo]# chattr +i /etc/service
▮ shell 설정
/etc/profile에서 시스템의 모든 사용자에 대해 HISTSIZE를 설정한다.
이는 .bash_profile 파일이 가질 수 있는 명령어수를 지정한다.
HISTSIZE=10
다음과 같이 설정하여 침입자가 현재 시스템에 로그인 되어 있지 않은 사용자의 .bash_profile 파일을 사용하지 못하게 한다.
HISTFILESIZE=0
▮ 파일 시스템 마운트 제어
/etc/fstab에 몇가지 옵션을 주어 설정하고 제어 할 수 있다.
일단 LABEL=/boot와 같은 이름을 /dev/hda1와 같이 파티션 장치명으로 바꾸어 준다.
이는 관리차원과 쿼터를 사용하게 될 때 문제가 될 수 있는 부분을 없애기 위함이다.
/boot 파티션 읽기 전용으로 설정
/dev/hda1 /boot ext3 default,ro 1 2
적용하려면
mount /boot -oremount
확인
cat /proc/mount
▮ chmod로 파일의 권한 변경
아래의 파일들은 침입자가 악용할 수 있는 파일들 이므로 root이외의 권한은 제거한다.
이외에도 설치한 패키지에 따라 권한을 제거해야 할 파일들이 있다.
wget, finger, nslookup그리고 gcc같은 컴파일러 패키지들은 설치 여부에 따라 존재하지 않을 수도 있다.
예] chmod 700 /usr/bin/whereis /usr/bin/consolehelper /usr/bin/pstree
/usr/bin/which /usr/bin/who /usr/bin/w /usr/bin/top
/usr/bin/find /bin/mail /bin/ps /usr/bin/wget /usr/bin/finger
/usr/bin/nslookup /usr/bin/gcc /usr/bin/cc
/usr/bin/c++ /usr/bin/make
2007년 9월 16일 일요일
[Howto] Useful commands for the Linux command line
arch
Outputs the processor architecture.$ arch
i686
cat
Outputs the contents of a file.$ cat lorem.txt
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
cd
Change the working directory.$ cd /bin
chgrp
Change group ownership of files.$ chgrp games moo.txt
chmod
Change access permissions of files.$ chmod +x helloworld
chown
Change file owner and group.# chown root lorem.txt
cksum
Print CRC checksum and byte counts of each file.$ cksum lorem.txt moo.txt
3570240675 453 lorem.txt
4294967295 0 moo.txt
cp
Copies a file.$ cp lorem.txt copy_of_lorem.txt
date
Outputs the current date and time.$ date
Sat Mar 3 12:07:09 GMT 2007
df
Reports the amount of disk space used and available on filesystems.$ df
Filesystem 1K-blocks Used Available Use% Mounted on<br>
/dev/simfs 39845888 218048 39627840 1% /
dir
List directory contents.$ dir
copy_of_lorem.txt lorem.txt moo.txt www
du
Estimate file space usage.$ du -h /bin
7.8M /bin
echo
Display a line of text.$ echo foobar
foobar
exit
Cause the shell to exit.$ exit
fgrep
Print lines matching a pattern in a file.$ fgrep "irure dolor" lorem.txt
commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
find
Search for files in a directory hierarchy.$ find hello*
hello_world
hello_world.c
free
Display amount of free and used memory in the system.$ free
total used free shared buffers cached
Mem: 8299892 8287708 12184 0 2641772 1731236
Low: 3581300 3572764 8536
High: 4718592 4714944 3648
-/+ buffers/cache: 3914700 4385192
Swap: 8193140 2335664 5857476
grep
Print lines matching a pattern.$ grep -i apple fruitlist.txt
apple
groups
Outputs the user groups of which your account belongs to.$ groups
games users
head
Output the first part of files.$ head -2 lorem.txt
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
hostname
Outputs the machines hostname on the network.$ hostname
anapnea.net
id
Outputs user id, group id, and groups of your account.$ id
uid=1478(smallfoot) gid=100(users) groups=35(games),100(users)
kill
End a process.$ kill -9 18298
-bash: kill: (18298) - Operation not permitted
killall
Kill processes by name.$ killall irssi
irssi(18298): Operation not permitted
irssi(13372): Operation not permitted
irssi(22048): Operation not permitted
irssi: no process killed
last
Show listing of last logged in users.$ last -n 3
alice pts/6 192.0.34.166 Fri May 18 16:17 still logged in
bob pts/2 64.233.183.103 Fri May 18 16:17 still logged in
clare pts/6 72.5.124.61 Fri May 18 15:54 - 15:55 (00:01)
ldd
Print shared library dependencies.$ ldd /bin/bash
libncurses.so.5 => /lib/libncurses.so.5 (0x40023000)
libdl.so.2 => /lib/libdl.so.2 (0x40065000)
libc.so.6 => /lib/libc.so.6 (0x40069000)
/lib/ld-linux.so.2 (0x40000000)
ln
Make links between files.$ ln -s data.txt symlink.txt
logname
Print user's login name.$ logname
smallfoot
ls
List directory contents.$ ls
copy_of_lorem.txt lorem.txt moo.txt www
man
Opens the manual page for a software or function.$ man bash
md5sum
Outputs the MD5 hash sum of a file.$ md5sum lorem.txt
56da9e37259af34345895883e6fd1a27 lorem.txt
mkdir
Makes a directory.$ mkdir foobar
mv
Moves a file.$ mv lorem.txt ipsum.txt
nl
Number lines of files.$ nl lorem.txt
1 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
2 tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
3 veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
4 commodo consequat. Duis aute irure dolor in reprehenderit in voluptate
5 velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
6 occaecat cupidatat non proident, sunt in culpa qui officia deserunt
7 mollit anim id est laborum.
nm
List symbols from object files.$ nm hello_world
080494a0 D _DYNAMIC
0804956c D _GLOBAL_OFFSET_TABLE_
08048474 R _IO_stdin_used
w _Jv_RegisterClasses
08049490 d __CTOR_END__
0804948c d __CTOR_LIST__
08049498 d __DTOR_END__
...
od
Dump files in octal and other formats.$ od -t x /bin/sh
2376640 00098020 000054d4 00000000 00000000
2376660 00000020 00000000 000000c7 00000008
2376700 00000003 080e6500 0009d4f4 00004ae8
...
pidof
Find the process ID of a running program.$ pidof fetchmail
22392
ping
Pings a host.$ ping -c 2 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.048 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.052 ms
--- 127.0.0.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.048/0.050/0.052/0.002 ms
ps
Outputs running processes.$ ps
PID TTY TIME CMD
21542 pts/12 00:00:00 bash
27706 pts/12 00:00:00 ps
pstree
Display a tree of processes.$ pstree
init-+-2*[BitchX]
|-3*[bash---sleep]
|-fetchmail
|-screen-+-bash---irssi
| `-bash---ctorrent
|-screen-+-bash---lisp.run
| |-bash---vi
| |-2*[bash]
| `-bash---lynx
|-2*[screen---bash---irssi]
|-screen---irssi
|-screen---bash
|-screen-+-bash
| `-irssi
|-skjerm---irssi
|-sshd-+-5*[sshd---sshd---bash---irssi]
| |-8*[sshd---sshd---bash]
| |-sshd---sshd---bash---screen
| |-sshd---sshd
| `-sshd---sshd---bash---pstree
`-syslog-ng
pwd
Outputs the name of current working directory.$ pwd
/home/smallfoot
rm
Removes a file or directory.$ rm lorem.txt
rmdir
Removes a directory.$ rmdir foobar
sed
Stream editor for filtering and transforming text.$ echo "My cat's name is Bob" | sed -e 's/Bob/Mittens/g'
My cat's name is Mittens
sha1sum
Outputs the SHA1 hash sum of a file.$ sha1sum lorem.txt
c942ddebd142ec8bacac9213d48096e74bab4957 lorem.txt
shutdown
Bring the system down in a secure way. All logged-in users are notified that the system is going down.$ shutdown now
size
List section sizes and total size.$ size /bin/bash
text data bss dec hex filename
621233 22712 19176 663121 a1e51 /bin/bash
stat
Outputs file status.$ stat lorem.txt
File: `lorem.txt'
Size: 453 Blocks: 8 IO Block: 4096 regular file
Device: 77h/119d Inode: 27312217 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1478/smallfoot) Gid: ( 100/ users)
Access: 2007-03-03 12:24:39.000000000 +0000
Modify: 2007-03-03 12:24:39.000000000 +0000
Change: 2007-03-03 12:24:39.000000000 +0000
strings
Print the strings of printable characters in files.$ strings hello_world
/lib/ld-linux.so.2
_Jv_RegisterClasses
__gmon_start__
libc.so.6
puts
_IO_stdin_used
__libc_start_main
GLIBC_2.0
PTRh%
[^_]
Hello World!
tail
Output the last part of files.$ tail -2 lorem.txt
occaecat cupidatat non proident, sunt in culpa qui officia deserunt
mollit anim id est laborum.
talk
Talk to another user.$ talk bob Lookout for the dopefish!
touch
Change a file's access and modification timestamps. If file does not exist, create it.$ touch lorem.txt
tty
Outputs the name of the current terminal.$ tty
/dev/pts/16
uname
Outputs operating system, hostname, kernel version, date and timp, and processor.$ uname -a
Linux anapnea.net 2.6.9 #1 SMP Wed Jul 19 16:24:18 MSD 2006 i686 Intel(R) Xeon(TM) CPU 2.80GHz GenuineIntel GNU/Linux
uptime
Outputs the system uptime.$ uptime
14:50:26 up 7 days, 17:52, 18 users, load average: 0.08, 0.02, 0.01
users
Print the user names of users currently logged in to the current host.$ users
alice bob charlie eve
vdir
List directory contents.$ vdir
total 8
-rw-r--r-- 1 smallfoot users 453 Mar 3 12:32 copy_of_lorem.txt
-rw-r--r-- 1 smallfoot users 453 Mar 3 12:24 lorem.txt
-rw-r--r-- 1 smallfoot users 0 Mar 3 12:32 moo.txt
lrwxr-xr-x 1 root root 18 Feb 27 19:33 www -> /var/www/smallfoot
w
Show who is logged on and what they are doing.$ w
12:14:30 up 5 days, 15:16, 19 users, load average: 0.00, 0.00, 0.00
USER TTY LOGIN@ IDLE JCPU PCPU WHAT
charlie pts/0 Fri21 3:26m 2.52s 2.52s irssi
alice pts/2 Wed17 30:21m 0.00s 0.00s -bash
emma pts/4 11:37 36:57 0.00s 0.00s -bash
frank pts/5 11:48 11:03 0.00s 0.00s -bash
smallfoo pts/12 12:01 0.00s 0.04s 0.01s w
wall
Send a message to everybody's terminal.$ wall next week we change the server for a new one
wc
Counts lines in a file.$ wc -l lorem.txt
7 lorem.txt
whatis
Search the whatis database for complete words.$ whatis bash
bash (1) - GNU Bourne-Again SHell
bash [builtins] (1) - bash built-in commands, see bash(1)
who
Outputs who is currently logged into the system.$ who
charlie pts/0 Mar 2 21:37 (xtreme-11-65.acme.com)
alice pts/2 Feb 28 17:48 (147.21.16.3)
emma pts/4 Mar 3 11:37 (32.84-48-181.uac.com)
frank pts/5 Mar 3 11:48 (port-212-202-233-2.foobar.org)
smallfoot pts/12 Mar 3 12:01 (c-12776f4.cust.example.net)
whereis
Locate the binary, source, and manual page files for a command.$ whereis bash
bash: /bin/bash /etc/bash /usr/share/man/man1/bash.1.gz
whoami
Outputs your username / the name of your account.$ whoami
smallfoot
2007년 9월 14일 금요일
2007년 7월 31일 화요일
[Tip] IE7Pro
Windows 상에서 사용하는 Web Browser는 자주 사용하는 순으로 Maxthon 1.6 - Firefox 2 - The World - IE6 이다.
창을 많이 띄우는 것을 싫어하기 때문에 Tabbed Browsing 기능은 필수이다.
가장 좋아하는 Firefox는 초기구동 시간이 가장 느리다.
사전을 포함해서 설치된 Extension이 24개나 된다. 빠른 구동을 위해 Extension의 수를 줄여보기도 했었다. 약간 빨라지긴 했지만 그래도 초기구동이 느린 것은 마찬가지였다. 더군다나 Extension 없는 Firefox라면 "앙꼬없는 찐빵" 아닌가?
초기구동 시간이 가장 빠른 IE6은 알다시피 기능 상 가장 떨어진다. Tabbed Browsing이 불가능하다. 그래서 정식버전이 나온 후에 IE7로 upgrade를 해보았지만 열악한 Tabbed Browsing 기능과 함께, 웹서핑 중 시도 때도 없이 다운되는 경우가 많아서 사용하지 않게 되었다.
자주 들르는 곳에서 다운되는 것은 그다지 상관이 없으나 처음 찾아내서 보고 있던 사이트에서 다운되어 버리는 경우 session restore기능이 없는 IE는 사람을 상당히 번거롭게 만들어 준다. 정말 중요한 내용을 발견한 경우라면 History를 뒤져서라도 다시 찾아내겠지만 보통은 그렇게까지 하지 않는다.
IE7에 session restore의 기능만 있었어도 가끔은 사용했을 텐데, 이것이 안되는 것이 결정적으로 사용하지 않게된 계기가 되었다.
우연히 IE7Pro란 IE7을 위한 Add-on 프로그램을 알게되었다.
다음과 같은 기능을 갖고 있다.
Enhance Internet Explorer's Tabbed Browsing Capabilities
1. Double click to close tab.
2. Open new tab from address bar.
3. Enable/disable tab browse history manager.
4. Enable/disable crash recovery
5. Move the IE menu bar above the address bar
6. Hide search bar.
7. Modify the maxium number of parallel connections to the web server.
8. Select the external program to view page source
Super Drag and Drop
Mouse Gesture
Crash Recovery
Save Page to Image
Quick Proxy Switcher
AD Blocker
Greasy monkey alike User Script
Inline Search
Spell Check
이 중 눈길을 끌었던 것은 강화된 Tabbed Browsing 기능도 있지만, 바로 Crash Recovery 기능이다. Firefox의 session restore와 같은 기능을 가능하게 해주는 것이다.
물론 좋은 session restore기능보다는 Browser 자체가 안정적으로 동작하는 것이 중요하다.
그렇지만 IE7Pro와 함께라면 IE7도 그리 나쁘지 않은 선택이 될 수 있을 것 같다.
더욱이 이름은 IE7Pro이지만 FAQ에 따르면 IE6과도 사용할 수 있다고 한다.
개인적인 의견으로는 MS에서 IE7에 이 정도의 기능들은 내장하고서 내보냈어야 하지 않나 생각한다.
Link
IE7Pro - The Ultimate Add-On for Internet Explorer 7
IE7Pro FAQ - IE7Pro WiKi
[추가]
윗 팁은 사용해보기 전에 작성한 것이다.
사용을 해보니 그리 나쁘지 않았다.
그러나 나를 IE7Pro로 인도한 Crash Recovery기능은 좀 문제가 있었다.
Crash가 일어나 IE가 죽은 경우에만 Recovery가 되어야 할텐데 IE를 시작하면
무조건 닫기 전에 열려있던 창을 다시 복원할 것인지 물어온다.
게다가 IE6으로는 Tabbed Browsing 기능이 의미가 없으므로 IE7으로 업데이트를 했다.
내가 기대했던 것은 IE6에서 멀티탭을 사용할 수 있게 해주는 것이었는데 약간은 실망스러웠다.