디렉토리 내에서 파일만 퍼미션 변경
스크립을 짜서 계속 활용하는 방법과 간단하게 써먹는 방법 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년 전 | 4050 | |
| 29 |
아우겐나이스
|
21년 전 | 4436 | |
| 28 |
아우겐나이스
|
21년 전 | 3464 | |
| 27 | 21년 전 | 5833 | ||
| 26 | 21년 전 | 3113 | ||
| 25 | 21년 전 | 6083 | ||
| 24 | 18년 전 | 3649 | ||
| 23 | 21년 전 | 3640 | ||
| 22 | 21년 전 | 4247 | ||
| 21 | 21년 전 | 3817 | ||
| 20 | 21년 전 | 4225 | ||
| 19 | 21년 전 | 6678 | ||
| 18 | 21년 전 | 4733 | ||
| 17 | 21년 전 | 6989 | ||
| 16 | 21년 전 | 4170 | ||
| 15 | 21년 전 | 2632 | ||
| 14 | 21년 전 | 4977 | ||
| 13 | 21년 전 | 3399 | ||
| 12 |
Recluse
|
21년 전 | 3881 | |
| 11 |
아우겐나이스
|
21년 전 | 3568 | |
| 10 |
Recluse
|
21년 전 | 3392 | |
| 9 | 21년 전 | 3991 | ||
| 8 | 21년 전 | 5171 | ||
| 7 | 21년 전 | 4761 | ||
| 6 | 21년 전 | 5686 | ||
| 5 | 21년 전 | 4114 | ||
| 4 | 21년 전 | 4840 | ||
| 3 | 21년 전 | 4740 | ||
| 2 | 21년 전 | 3244 | ||
| 1 | 22년 전 | 4341 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기