Last active
December 25, 2015 18:39
-
-
Save jexchan/7021796 to your computer and use it in GitHub Desktop.
- append file extension in batch
- removing file extension in batch, excute every 2 seconds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# append file extension in batch | |
ls /opt/optimize/store/barStore/*.tmp | sort -z -n | while read fname; do | |
echo "Appending : " + $fname; | |
mv $fname ${fname}.tmp | |
done | |
# removing file extension in batch, excute every 2 seconds | |
ls /opt/optimize/store/barStore/*.tmp | sort -z -n | while read fname; do | |
echo "Removing : " + $fname; | |
mv $fname ${fname%.tmp} | |
sleep 2s | |
done | |
lsof -p $java_pid #每个文件描述符的具体属性 | |
lsof -p $java_pid | wc -l #当前Java进程file descriptor table中FD的总量 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment