對不起,我忽略了妳的感受,我沒有真正了解妳的想法
謝謝妳,遷就了我17年
辛苦妳了
妳自由了







# Get the auth token. user="********" password="********" server="127.0.0.1" port="8080" #removeAction="remove" # Change to removedata to remove torrent+data removeAction="removedata" Label="LabelText" # Don't change anything below this line (unless you know what you're doing) resp1=`wget --save-cookies cookies.txt --keep-session-cookies --http-user=$user --http-password=$password -q -O - \ http://$server:$port/gui/token.html` token=`echo -e "$resp1" | awk -F'[<>]' '/]*id=[\"'"'"']*token[\"'"'"'][^>]*>([^<]*)<\/div>/ { print $5 }'` # Get the list of finished torrents resp2=`wget --load-cookies cookies.txt --http-user=$user --http-password=$password -q -O - \ http://$server:$port/gui/?list=1\&token=$token` # Substring it to the start of the torrents list. ndx=`echo -e "$resp2" | tr "\n" " " | awk '{ndx=match($0, /,"torrents": \[/); print ndx }'` sstr=${resp2:ndx} oldest=`date +"%s"` # Look at each line and identify the torrent listing. rx='^\[\"[^"]*\",[0-9]' IFS=" " for line in $sstr do if [[ "$line" =~ $rx ]]; then lineTokens=(`echo -e "$line" | sed -e 's/\[//g;s/\]//g;s/"//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' `) TokenLabel=$[${#lineTokens[*]}-15] if [[ "${#lineTokens[*]}" -ge "26" && "${lineTokens[1]}" == "136" && "${lineTokens[$TokenLabel]}" == "$Label" ]]; then if [[ $oldest -gt ${lineTokens[22]} ]]; then oldest=${lineTokens[22]} fi fi fi done for line in $sstr do # If this line matches a torrent item in the torrents property... if [[ "$line" =~ $rx ]]; then # Tokenize the fields. lineTokens=(`echo -e "$line" | sed -e 's/\[//g;s/\]//g;s/"//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' `) dlNdx=$[${#lineTokens[*]}-15] TokenCount=${#lineTokens[*]} TokenLabel=$[${#lineTokens[*]}-15] TokenStatus=$[${#lineTokens[*]}-7] TokenCompleted=$[${#lineTokens[*]}-4] # Double check that this is a torrent listing and that it's finished. #echo $line #echo "${#lineTokens[*]} ${lineTokens[$TokenLabel]} ${lineTokens[$TokenStatus]} ${lineTokens[$TokenCompleted]}" #if [[ "${#lineTokens[*]}" -ge "18" && "${lineTokens[1]}" == "136" && "${lineTokens[$dlNdx]}" == "1000" ]]; then if [[ "$TokenCount" -ge "26" && "${lineTokens[1]}" == "136" && "${lineTokens[$TokenLabel]}" == "$Label" ]]; then # Make the call to remove the torrent. if [ "${lineTokens[$TokenCompleted]}" == "$oldest" ]; then echo "Torrent $removeAction: ${lineTokens[0]}" resp3=`wget --load-cookies cookies.txt --http-user=$user --http-password=$password -q -O - \ http://$server:$port/gui/?action=$removeAction\&token=$token\&hash=${lineTokens[0]}` if [[ "$resp3" == "" ]]; then echo "Error removing torrent: ${lineTokens[2]} (id: ${lineTokens[0]})" fi fi fi fi done rm cookies.txt
impossible to convert between the formats supported by the filter 'Parsed_null_0' and the filter 'auto-inserted scaler 0'
#!/bin/bash
# Loop badblock to write disk
# check the disk endurance, and update it to blogger
DISK='sdc '
while true
do
sudo badblocks -ws -o usbstick.log /dev/sdc
DATE=`date -R`
DISK_TOTAL_MBYTES_WRITEN=`grep $DISK /proc/diskstats|awk '{print $3"\t"$10 / 2 / 1024}' `
BADBLOCKS_LOG=`cat usbstick.log`
echo $DATE,$DISK_TOTAL_MBYTES_WRITEN,$BADBLOCKS_LOG >> Sandisk_8G_Write_test.txt
b.py post Sandisk_8G_Write_test.txt
done
快閃記憶體可靠性對控制晶片的挑戰我手上有Raspberry pi跟Raspberry pi2各一塊,都是用MicroSD作為主要儲存
從NAND Flash耐受度(Endurance)與所需ECC修正位元數的趨勢來看,過去SLC僅使用1bit ECC,P/E Cycles為100K,到了2xnm就降到60K,MLC則隨著製程的演進,Endurance呈現巨幅下降,ECC修正位元數呈現指數曲線的暴增;從5xnm製程的MLC的P/E Cycles有10K、需4bit ECC,到3xnm製程的MLC其P/E Cycles已下降到5K,且需要 8bit ECC;2xnm製程的MLC則降為3K、ECC修正位元提高到15~24bit。而TLC記憶體的P/E Cycles更降到1K以下,需72bit甚至上百位元的ECC。因此Flash控制晶片的編碼技術,將從BCH編碼技術,逐漸轉向LDPC(Low Density Parity Check)。
refer: Flash與SSD產業的挑戰─可靠度與總成本
#!/bin/sh
# resume me-tv-client if exist
case "$1" in
hibernate|suspend)
#echo "7 blink" >/proc/acpi/ibm/led
killall me-tv-server
killall me-tv-client
;;
thaw|resume)
for X in /sys/bus/usb/devices/*; do
#if [ "$VID" == "$(cat $X/idVendor 2>/dev/null)" -a "$PID" == "$(cat $X/idProduct 2>/dev/null)" ]
if [ "MDTV Receiver" = "$(cat $X/product 2>/dev/null)" ]
then
Port_Number=`echo $X | awk -F / '{print $NF}'`
#echo "Found $Port_Number"
echo $Port_Number > /sys/bus/usb/drivers/usb/unbind
sleep 1
echo $Port_Number > /sys/bus/usb/drivers/usb/bind
break
fi
done
;;
*) exit $NA
;;
esac
exit 0




但C.H.I.P提供的linux image,可以肯定的是其中sunxi這個社群的貢獻一定功不可沒The sunxi community is a very active and advanced one. For more information, check our linux-sunxi community page. It explains how to get help and how to contact us, and how you can contribute as well.Allwinner does not actively participate in or support this community. In fact, it is violating the GPLv2 license in several ways and has so far not shown willingness to resolve this.