Skip to content

Instantly share code, notes, and snippets.

@jexchan
Last active December 25, 2015 18:39
Show Gist options
  • Save jexchan/7021796 to your computer and use it in GitHub Desktop.
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
# 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