디렉토리 내에서 파일만 퍼미션 변경
스크립을 짜서 계속 활용하는 방법과 간단하게 써먹는 방법 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년 전 | 4081 | |
| 29 |
아우겐나이스
|
21년 전 | 4462 | |
| 28 |
아우겐나이스
|
21년 전 | 3489 | |
| 27 | 21년 전 | 5872 | ||
| 26 | 21년 전 | 3148 | ||
| 25 | 21년 전 | 6119 | ||
| 24 | 18년 전 | 3683 | ||
| 23 | 21년 전 | 3676 | ||
| 22 | 21년 전 | 4269 | ||
| 21 | 21년 전 | 3851 | ||
| 20 | 21년 전 | 4254 | ||
| 19 | 21년 전 | 6714 | ||
| 18 | 21년 전 | 4758 | ||
| 17 | 21년 전 | 7010 | ||
| 16 | 21년 전 | 4194 | ||
| 15 | 21년 전 | 2661 | ||
| 14 | 21년 전 | 4997 | ||
| 13 | 21년 전 | 3420 | ||
| 12 |
Recluse
|
21년 전 | 3904 | |
| 11 |
아우겐나이스
|
21년 전 | 3590 | |
| 10 |
Recluse
|
21년 전 | 3425 | |
| 9 | 21년 전 | 4037 | ||
| 8 | 21년 전 | 5202 | ||
| 7 | 21년 전 | 4789 | ||
| 6 | 21년 전 | 5724 | ||
| 5 | 21년 전 | 4143 | ||
| 4 | 21년 전 | 4875 | ||
| 3 | 21년 전 | 4775 | ||
| 2 | 21년 전 | 3276 | ||
| 1 | 22년 전 | 4365 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기