Recursive File Search : find, copy, rename #!/bin/sh var=0 for f in $(find . -name "undistorted.png") do var=$((var+1)) cp $f "images/image_"$var".png" done Executable FIle List Soft Link #!/bin/sh for f in $(find apps -type f -executable) do sudo ln -s $(pwd)/$f /usr/local/bin/$(basename $f) done Text Read and String Compare in while loop #!/bin/sh for f in $(find . -name "scene*") do echo ====..
#!/bin/sh #Directory List for f in $(ls -d */) do echo $f done #String Replace sed -i 's/original/new/g' file.txt #Get File Directory Name without Path filename=$(dirname $f) echo "${filename##*/}" #Get File Name and Extension filename=$(basename $f) filename="${filename%.*}" extension="${filename##*.}" # reference : http://stackoverflow.com/questions/965053/extract-filename-and-extension-in-bash
리눅스 명령어 중 "clear" 라는 명령어가 있다.. 하지만 이 clear 명령어 입력후 스크롤을 올려보면 그것들은 지워진것이 아니라.. 충격적이게도.... 그것은 리눅스가 스크롤만 내려준것일뿐.. 이것을 해결하기 위한 진짜 Real Clear! 그 명령어는 바로... echo -e '\033c\c' "echo" 옵션에 대해서 좀 더 공부를 하면 쉽게 알수 있을꺼라는 느낌이 오지만.. 지금은 이해보단 활용을 위해서! 좀 더 편하게 쓰기위해 alias에 등록! alias cls="echo -e '\033c\c'" 이제부터는 "cls"만 입력하여 진짜 화면 지우개를 이용해보자!
리눅스 압축 파일 명령어 총정리
1. 디스크 파티션 확인 명령어1cat /proc/partitionscs 2. SD카드 지우기 명령어1sudo dd if=/dev/zero of=/dev/sdd bs=8192cs 3. VMware tools Install > log | tee logcs 7. HTML Encoding1cs 8. Path Add1PATH=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin:$PATHcs 9. setting network12345ifconfig eth0 192.168.0.59route add default gw xxx.xxx.xxx.xxx vi /etc/resolve.confnameserver..