Skip to content

Instantly share code, notes, and snippets.

@miracle0k
miracle0k / nas_time_sync.sh
Created December 17, 2014 08:07
시놀리지 타임 싱크 스크립트
#!/bin/sh
echo "stop ntp deamon"
/usr/syno/etc/rc.d/S23ntpd.sh stop
echo "sync time"
/usr/sbin/ntpdate pool.ntp.org
echo "start ntp deamon"
/usr/syno/etc/rc.d/S23ntpd.sh start
@miracle0k
miracle0k / Convert UTF-8-MAC to UTF-8.sh
Last active August 29, 2015 14:11
MAC UTF8로 인코딩된 파일을 UTF8로 인코딩해서 파일명 변경
#!/bin/sh
ORG=$1
UTF8_STR=`echo $1 | /usr/bin/iconv -f UTF-8-MAC -t UTF-8`
FILE_NAME=${UTF8_STR%%.*}
FILE_EXT=${UTF8_STR##*.}
echo "$FILE_NAME"
echo "$FILE_EXT"