'잡동사니'에 해당되는 글 13669건

  1. 2014.09.02 ECR ECO ECN
  2. 2014.09.02 공유메모리
  3. 2014.09.01 bash 파일 상태 관련 if
  4. 2014.08.31 vmware / virtualbox 성능비교
  5. 2014.08.30 audit
  6. 2014.08.30 history - bash
  7. 2014.08.29 img 와 iso
  8. 2014.08.29 dd - disk duplicate
  9. 2014.08.29 /etc/login.defs 로 암호 최소 길이 수정하기
  10. 2014.08.29 virtualbox 포트포워딩 설정하기
회사일2014. 9. 2. 11:21
Engineering Change Request     / 변경요구
Engineering Change Order         / 변경명명
Engineering Change Notification / 변경알림

[링크 : http://thatisgood.tistory.com/59]

'회사일' 카테고리의 다른 글

pulseaudio / jack / sound server  (0) 2014.11.16
ADAT - Alesis Digital Audio Tape  (0) 2014.11.03
CD 굽는 컴퓨터  (4) 2012.11.20
SUS(Steel Use Stainless) / STS  (0) 2012.03.11
SEMS screw  (0) 2012.01.04
Posted by 구차니
Linux API2014. 9. 2. 08:08

'Linux API' 카테고리의 다른 글

lirc - linux IR Remote control  (0) 2015.03.31
vaapi vdpau uvd  (6) 2015.03.26
linux 최대 thread 갯수  (0) 2015.01.22
getopt() / getopt_long()  (0) 2014.11.19
timeval, gettimeofday()  (0) 2013.08.20
Posted by 구차니
Linux2014. 9. 1. 15:59

PrimaryMeaning
-a FILE ] True if FILE exists.
-b FILE ] True if FILE exists and is a block-special file.
-c FILE ] True if FILE exists and is a character-special file.
-d FILE ] True if FILE exists and is a directory.
-e FILE ] True if FILE exists.
-f FILE ] True if FILE exists and is a regular file.
-g FILE ] True if FILE exists and its SGID bit is set.
-h FILE ] True if FILE exists and is a symbolic link.
-k FILE ] True if FILE exists and its sticky bit is set.
-p FILE ] True if FILE exists and is a named pipe (FIFO).
-r FILE ] True if FILE exists and is readable.
-s FILE ] True if FILE exists and has a size greater than zero.
-t FD ] True if file descriptor FD is open and refers to a terminal.
-u FILE ] True if FILE exists and its SUID (set user ID) bit is set.
-w FILE ] True if FILE exists and is writable.
-x FILE ] True if FILE exists and is executable.
-O FILE ] True if FILE exists and is owned by the effective user ID.
-G FILE ] True if FILE exists and is owned by the effective group ID.
-L FILE ] True if FILE exists and is a symbolic link.
-N FILE ] True if FILE exists and has been modified since it was last read.
-S FILE ] True if FILE exists and is a socket.
FILE1 -nt FILE2 ] True if FILE1 has been changed more recently than FILE2, or if FILE1 exists and FILE2 does not.
FILE1 -ot FILE2 ] True if FILE1 is older than FILE2, or is FILE2 exists and FILE1 does not.
FILE1 -ef FILE2 ] True if FILE1 and FILE2 refer to the same device and inode numbers.
-o OPTIONNAME ] True if shell option "OPTIONNAME" is enabled.
[ -z STRING ] True of the length if "STRING" is zero.
[ -n STRING ] or [ STRING ] True if the length of "STRING" is non-zero.
[ STRING1 == STRING2 ] True if the strings are equal. "=" may be used instead of "==" for strict POSIX compliance.
[ STRING1 != STRING2 ] True if the strings are not equal.
[ STRING1 < STRING2 ] True if "STRING1" sorts before "STRING2" lexicographically in the current locale.
[ STRING1 > STRING2 ] True if "STRING1" sorts after "STRING2" lexicographically in the current locale.
[ ARG1 OP ARG2 ] "OP" is one of -eq-ne-lt-le-gt or -ge. These arithmetic binary operators return true if "ARG1" is equal to, not equal to, less than, less than or equal to, greater than, or greater than or equal to "ARG2", respectively. "ARG1" and "ARG2" are integers.

[링크 : http://www.tldp.org/LDP/Bash-Beginners-Guide/html/sect_07_01.html]
[링크 : https://linuxacademy.com/blog/linux/conditions-in-bash-scripting-if-statements/]

'Linux' 카테고리의 다른 글

nice  (0) 2014.09.16
bash VI 모드 / Emacs 모드  (0) 2014.09.03
audit  (0) 2014.08.30
history - bash  (0) 2014.08.30
dd - disk duplicate  (0) 2014.08.29
Posted by 구차니
약간 오래된(?) 문서로
2013년 작성된건데.. 전반적으로 vmware의 성능 승리이다.

[링크 : http://xmodulo.com/2013/07/vmware-player-vs-virtualbox-performance-comparison.html]

vmware player도 배포를 제외하면 
개발용으로 회사에서 써도 되는 것으로 생각되니
vmware player / virtualvbox 중에서 적당히 골라 쓰면 될 듯
[링크 : http://www.2cpu.co.kr/bbs/board.php?bo_table=freeboard_2011&wr_id=73967]
Posted by 구차니
Linux2014. 8. 30. 21:43
history 등으로 추적하기에는 힘들기 때문에
(만약에 외부에서 들어와서 해킹하면 history 삭제는 기본일테니?)
audit을 통해 사용자들의 명령어를 전부 기록하는 방법이 있다고 한다.

물론 보안적인 목적이 아니라면..
개인의 입력을 전부 녹화하는 거라
웬지 사용자 측면에서 찜찜할 수 밖에 없는지라
크게 권장할 만한 기술은 아닐것으로 보여진다.

[링크 : http://serverfault.com/questions/336217/how-do-i-log-every-command-executed-by-a-user]
[링크 : http://www.cyberciti.biz/tips/howto-log-user-activity-using-process-accounting.html]

'Linux' 카테고리의 다른 글

bash VI 모드 / Emacs 모드  (0) 2014.09.03
bash 파일 상태 관련 if  (0) 2014.09.01
history - bash  (0) 2014.08.30
dd - disk duplicate  (0) 2014.08.29
/etc/login.defs 로 암호 최소 길이 수정하기  (0) 2014.08.29
Posted by 구차니
Linux2014. 8. 30. 20:46
history는 지금까지 사용한 명령어의 목록을 보여주는 프로그램이다.
(정확하게는 쉘 명령어)
[링크 : http://linux.die.net/man/1/history] bash built-in command
[링크 : http://linux.die.net/man/3/history] library

typedef void * histdata_t;

typedef struct _hist_entry {
  char *line;
  char *timestamp;
  histdata_t data;
} HIST_ENTRY;

HIST_ENTRY ** the_history_list;

typedef struct _hist_state {
  HIST_ENTRY **entries; /* Pointer to the entries themselves. */
  int offset;           /* The location pointer within this array. */
  int length;           /* Number of elements within this array. */
  int size;             /* Number of slots allocated to this array. */
  int flags;
} HISTORY_STATE;

$HISTFILE에 history 내용이 저장되며
bash일 경우 ~/.bash_history 에 저장된다.

$HISTTIMEFORMAT을 통해 history 명령시 명령을 수행한 시간등을 같이 출력이 가능해진다.


개인사용자가 사용한 명령어를 보는데 있어서(사고 쳤을때 라던가?)
제한적이지만(히스토리 기능을 꺼버릴수도 있으니) 개별 사용자의 history를 추적하는것도 방법이긴 하나..
date 값 까지 출력하지 않으면 큰 의미가 없을 것으로 생각된다.

[링크 : http://stackoverflow.com/questions/8561983/retrieving-command-line-history]
[링크 : http://www.tecmint.com/history-command-examples/]
[링크 : http://www.cyberciti.biz/faq/unix-linux-bash-history-display-date-time/]


+
2019.02.14

export HISTTIMEFORMAT="%y/%m/%d %T " 

보기 편한(?) "년/월/일 시:분:초" 포맷으로 출력된다.



'Linux' 카테고리의 다른 글

bash 파일 상태 관련 if  (0) 2014.09.01
audit  (0) 2014.08.30
dd - disk duplicate  (0) 2014.08.29
/etc/login.defs 로 암호 최소 길이 수정하기  (0) 2014.08.29
mount - relatime / noatime  (0) 2014.08.28
Posted by 구차니
분류가 모호한 글2014. 8. 29. 22:21
img나 iso나 둘다 섹터 기반으로 그게 그거라지만
img는 iso에 반해 복수개의 트랙을 지원하지 않는 차이가 있다.

결론은.. 미친(!) 척 iso 파일을 rawrite로 써도 상관없다면..
부팅가능한 iso도 rawrite로 usb에 쓰면 부팅이 된다는 건가?

Considerations
There is no difference in the structure of ISO and IMG formats if the IMG file is uncompressed. It is possible for an IMG format file to be renamed with the ISO file extension and then opened in software that only recognizes the ISO file format. This is an effective way of accessing disc information in programs that do not handle the IMG format.

[링크 : http://www.ehow.com/info_8075301_differences-between-iso-img-files.html

Comparison to ISO images
ISO images are another type of optical disc image files, which commonly use the .iso file extension, but sometimes use the .img file extension as well. They are similar to the raw optical disc images, but contain only one track with computer data obtained from an optical disc. They can not contain multiple tracks, nor audio or video tracks. They also do not contain the control headers and error correction fields of CD-ROM or DVD sectors that raw disc images usually store. Their internal format follows the structure of an optical disc file system, commonly ISO 9660 (for CDs) or UDF (for DVDs). The CUE/BIN and CCD/IMG formats, which usually contain raw disc images, can also store ISO images instead.

[링크 : http://en.wikipedia.org/wiki/IMG_(file_format)]  

'분류가 모호한 글' 카테고리의 다른 글

acoustic phased array speaker  (0) 2015.08.20
각종 오디오 코덱 가격  (0) 2015.01.26
kdiff3 / winmerge / meld UI 비교  (0) 2014.04.30
경위대식 / 적도의식  (4) 2012.10.17
MS 카드  (0) 2012.10.10
Posted by 구차니
Linux2014. 8. 29. 15:47
일반적으로 파티션을 덤프하거나
파티션을 만들기 위해 파일을 생성하거나(가상 디스크 파일)
이럴때 사용하는 녀석인데..

ibs는 input block size(read) 기본 512
obs는 output block size(write) 기본 512
bs 는 ibs와 obs를 동시에 대체한다.

seek는 일종의 offset으로
obs * seek 부터 쓰기 시작하며
값이 설정되지 않았다면 기본값인 512byte를 점프하게 된다.

count는 몇번 반복하냐며
ibs * count 만큼의 용량으로 복사하게 된다.

bs=BYTES
    read and write BYTES bytes at a time (also see ibs=,obs=)
cbs=BYTES
    convert BYTES bytes at a time
conv=CONVS
    convert the file as per the comma separated symbol list
count=BLOCKS
    copy only BLOCKS input blocks
ibs=BYTES
    read BYTES bytes at a time (default: 512)
if=FILE
    read from FILE instead of stdin
iflag=FLAGS
    read as per the comma separated symbol list
obs=BYTES
    write BYTES bytes at a time (default: 512)
of=FILE
    write to FILE instead of stdout
oflag=FLAGS
    write as per the comma separated symbol list
seek=BLOCKS
    skip BLOCKS obs-sized blocks at start of output
[링크  : http://linux.die.net/man/1/dd

'Linux' 카테고리의 다른 글

audit  (0) 2014.08.30
history - bash  (0) 2014.08.30
/etc/login.defs 로 암호 최소 길이 수정하기  (0) 2014.08.29
mount - relatime / noatime  (0) 2014.08.28
linux shared object(so) tutorial  (0) 2014.06.30
Posted by 구차니
Linux2014. 8. 29. 09:39
실패 -_-
가장 간단(?)한 방법으로 root를 통해 암호를 수정하면 된다.
[링크 : http://www.hecticgeek.com/2012/01/skip-password-too-simple-message-ubuntu-linux/]

---

테스트 환경
Ubuntu 10.04 LTS Desktop 32bit

/etc/pam.d/common-passwd 를 수정해서
하는 법이 있으나 pam_cracklib.so 를 구해야 하는데 웬지 찜찜하다 -_-a
[링크 : https://www.linuxquestions.org/.../howto-change-system-password-policies-passwd-length...]
[링크 : http://www.deer-run.com/~hal/sysadmin/pam_cracklib.html]
[링크 : http://www.linuxquestions.org/questions/linux-security-4/allow-weak-password-352428/]

PASS_MAX_DAYS   60
PASS_MIN_DAYS   1
PASS_MIN_LEN    8
PASS_WARN_AGE   7 

[링크 : http://jmnote.com/wiki/리눅스_패스워드_정책]

PASS_MAX_LEN (number), PASS_MIN_LEN (number)
           Number of significant characters in the password for crypt().
           PASS_MAX_LEN is 8 by default. Don't change unless your crypt() is
           better. This is ignored if MD5_CRYPT_ENAB set to yes. 
[링크 : http://man7.org/linux/man-pages/man5/login.defs.5.html]

음... passwd 유틸리티에서 막는건지
PASS_MIN_LEN 1을 설정해도 1자리로 되진 않는다 -_-

'Linux' 카테고리의 다른 글

history - bash  (0) 2014.08.30
dd - disk duplicate  (0) 2014.08.29
mount - relatime / noatime  (0) 2014.08.28
linux shared object(so) tutorial  (0) 2014.06.30
리눅스 쉘 스크립트 << EOF 를 이용해서 자동화 하기  (0) 2014.04.11
Posted by 구차니

virtualbox 에서 호스트에서만 접속을 허용할 경우 라던가. 아무튼
외부와의 접점이 필요할 경우 사용한 방법으로 NAT port forward라는게 있다.

Step 1. 리눅스 내의 아이피 확인(DHCP 라면 고정하는게 편하다)


Step 2. virtualBox의 해당 가상머신 설정에서 네트워크 - 어댑터 - 고급 - "포트 포워딩"


Step 3. 아래와 같이 입력한다.
호스트는 현재 사용중인 실체/물리 PC를 뜻하니 
컴퓨터의 ip를 적거나 가장 편하게(!) 127.0.0.1로 설정한다(localhost라고 입력은 아예 못하게 ip 타입으로 입력 받는다)



음.. 단순화 시키면
호스트 아이피는 127.0.0.1로 고정하고
호스트 포트는 외부 포트
게스트 IP는 포워딩 할 IP
게스트 포트는 포워딩 할 포트로 생각해서 일반적인 공유기 설정하듯 쓰면 된다.



아래는 설정에 참고한 Virtualbox 도움말

To forward all incoming traffic from a specific host interface to the guest, specify the IP of that host interface like this:

VBoxManage modifyvm "VM name" --natpf1 "guestssh,tcp,127.0.0.1,2222,,22"

This forwards all TCP traffic arriving on the localhost interface (127.0.0.1) via port 2222 to port 22 in the guest.

Posted by 구차니