스크립트

# for x in {1..4}; do ln -s /mnt/sdb1/$x /srv/$x; done

결과물

$ ln -s /mnt/sdb1/1 /srv/1

$ ln -s /mnt/sdb1/2 /srv/2

$ ln -s /mnt/sdb1/3 /srv/3

$ ln -s /mnt/sdb1/4 /srv/4

'linux' 카테고리의 다른 글

vsftpd 유저 상위 디렉토리 접근 제한  (0) 2013.05.06
쉘 스크립트 정리  (0) 2013.03.29
/etc/resolv.conf 가 자꾸 초기화 될때  (2) 2012.08.30
우분투 root권한 얻기  (0) 2012.08.29
리눅스 ln명령어  (0) 2012.08.28

ln [옵션] [링크파일]

자주쓰는 옵션

 -s 심볼릭 링크 (없을시 하드링크)

 -ld 링크확인


*unlink [파일명] 링크해제

*하드링크 : 원본이 사라져도 무관


메뉴얼

  --backup[=CONTROL]      make a backup of each existing destination file

  -b                          like --backup but does not accept an argument
  -d, -F, --directory         allow the superuser to attempt to hard link
                                directories (note: will probably fail due to
                                system restrictions, even for the superuser)
  -f, --force                 remove existing destination files
  -n, --no-dereference        treat destination that is a symlink to a
                                directory as if it were a normal file
  -i, --interactive           prompt whether to remove destinations
  -s, --symbolic              make symbolic links instead of hard links
  -S, --suffix=SUFFIX         override the usual backup suffix
  -t, --target-directory=DIRECTORY  specify the DIRECTORY in which to create
                                the links
  -T, --no-target-directory   treat LINK_NAME as a normal file
  -v, --verbose               print name of each file before linking
      --help     이 도움말을 표시하고 끝냅니다
      --version  버전 정보를 출력하고 끝냅니다


'linux' 카테고리의 다른 글

vsftpd 유저 상위 디렉토리 접근 제한  (0) 2013.05.06
쉘 스크립트 정리  (0) 2013.03.29
/etc/resolv.conf 가 자꾸 초기화 될때  (2) 2012.08.30
우분투 root권한 얻기  (0) 2012.08.29
쉘스크립트  (0) 2012.08.28
@OneToMany 관계에서 List를 사용하려면 항상 mappedBy 를 하셔야할겁니다.

관련 정보는 http://docs.jboss.org/hibernate/stable/annotations/reference/en/html_single/ 문서에서 Collections 와 Indexed Collections (List,Map) 부분을 참조해보세요.


+ Recent posts