No more IE!請試著使用FirefoxGoogle Chrome等瀏覽器瀏覽
標頭的可愛Alaskan Malamute來自維基百科~

2015年1月22日 星期四

[Linux指令] 如何抓取FTP目錄下的資料夾

Linux下的 ftp 工具可以用 mget 來抓取複數檔案,但是遇到資料夾時卻行不通,面對一層層的資料夾,要怎樣才能簡單的快速抓取全部檔案呢?

使用 wget 就可以了! 可以參考以下的指令:
wget -r ftp://user:pass@server//absolute/path/to/directory
user 要換成你的帳號,pass 則是密碼
如果是匿名登入不需要帳密,將 user:pass@ 省略,只留下路徑即可


進階版:
wget -r -nH --cut-dirs=5 -nc ftp://user:pass@server//absolute/path/to/directory
多出來幾個選項,而且server後面多一條斜線(\),可以讓 wget 的行為更合理


來源及詳情參照:


2015年1月12日 星期一

Install climate data operators (cdo) on Ubuntu with netCDF4 and hdf5 support


Nikolay Koldunov
koldunovn@gmail.com
@oceanographer
CDOs can be installed from Ubuntu repositories, but they are compiled without netCDF4 and HDF5 support. As a result you can get:

Unsupported file type (library support not compiled in)

error. To solve this we have to compile cdo by ourselves.

Uninstal cdo if you have them installed from Ubuntu repositories:sudo apt-get purge cdo


Install netcdf andf HDF5 libraries:sudo apt-get install libnetcdf-dev libhdf5-dev


Download latest stable version of cdo from here

Unpack it

cd to unpacked directory

If you want to install cdo in to your system directory:./configure --enable-netcdf4 --enable-zlib --with-netcdf=/usr/ --with-hdf5=/usr/ make sudo make install


If you don't have administrative rights, of would like to have installation of cdo in other folder for any other reason, you can provide prefix:./configure --enable-netcdf4 --enable-zlib --prefix=/dir/where/to/put/cdo --with-netcdf=/usr/ --with-hdf5=/usr/ make make install


In the last case you should also add this path to your $PATH in .bashrc file:export PATH=/dir/where/to/put/cdo/bin:$PATH


note bin at the end!

Hope it will work for you :)