這個網誌中的熱門文章
Icescream 它是一個分散式的 compiler 架構…
Icescream 它是一個分散式的 compiler 架構… 可以藉由同個網域下的cpu資源~來減少編譯程式的時間! 在Debian 和 Ubuntu 下相當好安裝… 只要 $sudo aptitude install icecc icecc-monitor 然後 $export PATH=/usr/lib/icecc/bin:$PATH 就好了 在同一個網域下,把一台機器設成 scheduler (一台就好) sudo vim /etc/default/icecc # Defaults for icecc initscript # sourced by /etc/init.d/icecc START_ICECC="true" START_ICECC_SCHEDULER=" true " 把紅色的地方 false 改成 true sudo /etc/init.d/icecc restart 就搞定了… 編譯的時間會隨著電腦的多寡來增快~
Automatically classify folders by file name (windows Bash)
REM List file names, sorted by file name--------- dir /b /on > list.txt REM Find JPG files findstr ".JPG" list.txt > target.txt rem delete file extension------------------------- @echo off & setlocal enabledelayedexpansion rem reads all the contents of target.txt for /f "eol=* tokens=*" %%i in (target.txt) do ( rem sets variable a to the content of each line set a=%%i rem If the line has .JPG, change it to set "a=!a:.JPG=!" rem saves all modified lines into $ echo !a!>>$) rem replaces the original a.txt content with the content of $ move $ target.txt REM Create folder----------------------------- rem reads all the contents of target.txt for /f "eol=* tokens=*" %%i in (target.txt) do ( set string=%%i echo "%%i" for /f "tokens=1,2 delims=_" %%a in ("%%i") do ( set BEFORE_UNDERSCORE=%%a set AFTER_UNDERSCORE=%%b echo %%a md %%a rem Move files to folder move %%i*.* %%a )) del list.txt del target.txt


留言