디렉토리 내에서 파일만 퍼미션 변경
스크립을 짜서 계속 활용하는 방법과 간단하게 써먹는 방법 2가지 알려드립니다.
1. 스크립트 시킨뒤 계속쓰는 방법
[root@localhost home]# vi /usr/bin/fileprm
=====================삽입=====================
#!/bin/sh
input=$1
chmod $input `ls -l|grep ^-|awk '{print $9}'`
==============================================
:wq!
[root@localhost home]# chmod 755 /usr/bin/fileprm
사용예
[root@localhost home]# fileprm 755
2번째 그냥쓸경우
[root@localhost home]# chmod 755 `ls -l|grep ^-|awk '{print $9}'`
해당 숫자만 바꾸어서 쓰시면됩니다.
1. 스크립트 시킨뒤 계속쓰는 방법
[root@localhost home]# vi /usr/bin/fileprm
=====================삽입=====================
#!/bin/sh
input=$1
chmod $input `ls -l|grep ^-|awk '{print $9}'`
==============================================
:wq!
[root@localhost home]# chmod 755 /usr/bin/fileprm
사용예
[root@localhost home]# fileprm 755
2번째 그냥쓸경우
[root@localhost home]# chmod 755 `ls -l|grep ^-|awk '{print $9}'`
해당 숫자만 바꾸어서 쓰시면됩니다.
[이 게시물은 관리자님에 의해 2011-10-31 17:32:05 Linux에서 이동 됨]
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 30 |
아우겐나이스
|
21년 전 | 4053 | |
| 29 |
아우겐나이스
|
21년 전 | 4441 | |
| 28 |
아우겐나이스
|
21년 전 | 3467 | |
| 27 | 21년 전 | 5838 | ||
| 26 | 21년 전 | 3122 | ||
| 25 | 21년 전 | 6088 | ||
| 24 | 18년 전 | 3652 | ||
| 23 | 21년 전 | 3642 | ||
| 22 | 21년 전 | 4248 | ||
| 21 | 21년 전 | 3819 | ||
| 20 | 21년 전 | 4229 | ||
| 19 | 21년 전 | 6682 | ||
| 18 | 21년 전 | 4734 | ||
| 17 | 21년 전 | 6997 | ||
| 16 | 21년 전 | 4173 | ||
| 15 | 21년 전 | 2637 | ||
| 14 | 21년 전 | 4981 | ||
| 13 | 21년 전 | 3405 | ||
| 12 |
Recluse
|
21년 전 | 3887 | |
| 11 |
아우겐나이스
|
21년 전 | 3572 | |
| 10 |
Recluse
|
21년 전 | 3398 | |
| 9 | 21년 전 | 4004 | ||
| 8 | 21년 전 | 5178 | ||
| 7 | 21년 전 | 4769 | ||
| 6 | 21년 전 | 5695 | ||
| 5 | 21년 전 | 4121 | ||
| 4 | 21년 전 | 4850 | ||
| 3 | 21년 전 | 4747 | ||
| 2 | 21년 전 | 3248 | ||
| 1 | 22년 전 | 4344 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기