* sticky bit
“Sticky” means that even if multiple users have write permission on a directory,
only the owner of a file can delete the file within a sticky directory.
* list up partitions
$ cat /proc/partitions
* partition editor
$ gparted
* mpeg4 --> mp3 conversion
$ ffmpeg -i <mpeg4 file> -b 192k <mp3-filename.mp3>
* NFS Client version & Stat
Client rpc stats:
calls retrans authrefrsh
25530 0 0
Client nfs v3:
null getattr setattr lookup access readlink
0 0% 6864 26% 25 0% 832 3% 2054 8% 1 0%
read write create mkdir symlink mknod
15272 59% 43 0% 9 0% 0 0% 0 0% 0 0%
remove rmdir rename link readdir readdirplus
12 0% 0 0% 1 0% 4 0% 2 0% 105 0%
fsstat fsinfo pathconf commit
278 1% 26 0% 0 0% 0 0%
* Remote NFS version check
program 100003 version 2 ready and waiting
program 100003 version 3 ready and waiting
[rsyoung@ui01 CDF]$ whereis nfs
* Filesystem Block Size
dumpe2fs 1.39 (29-May-2006)
Block size: 4096
[root@wn1038 ~]#
* condor queue에 있는 모든 job을 강제로 종료하기
awk 'print $1}'`; condor_rm -forcex $g;done
* worker node retrieving using "seq"
$(seq -f wn20%02g.rsyoung.org 01 12) ; \
do echo "[ $sv ]"; ssh $sv 'df -h /tmp' ; done
* onevm list에 나오는 uniq한 사용자 축출
awk -F " " '{print $2}' | sort | uniq | wc -l
* History Command
$ !4 <-- 4번째 명령실행
* Ubuntu Firewall Enable/ Disable
: ufw = uncomplicated firewall
* Ubuntu에서 nologin Account 생성하기
$ sudo useradd -s /usr/sbin/nologin <account_name>
* 큰파일 여러조각으로 만들고 복원하기
$ split --bytes = 1m /path/to/large/file
/path/to/output/file/prefix
/path/to/output/file/prefix
$ cat prefix* > xyz
* ip 주소만 축출하기
ifconfig | grep 'inet addr:' | grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'
* 특정시간이 이전에 수정된 파일 찾아 지우기
find . -ctime +0 -exec rm -f {} \;
* 특정 파일보다 이후에 생성된 파일 찾기
touch -t 201103010000 <filename> find . -type f -newer ../20110301 -exec ls -l {} \;
ip address del 192.168.0.100 dev eth0
* pdf 파일 잘라내기
vim /etc/modprobe.d/blacklist.conf
* 특정 파일보다 이후에 생성된 파일 찾기
- 찾은 후 파일크기 총합 구하기
cat files.txt | awk -F " " '{sum += $5} END {print sum}' * ip 주소 삭제하기
* pdf 파일 잘라내기
pdftk A=one.pdf B=two.pdf cat A1-7 B1-5 A8 output combined.pdf
* modprobe blacklist
vim /etc/modprobe.d/blacklist.conf
댓글 없음:
댓글 쓰기