LoginSignup
0
0

More than 5 years have passed since last update.

GNU Wget > ファイル既存時の".1"ファイル生成をやめる > -ncオプション

Last updated at Posted at 2018-06-19
動作環境
Xeon E5-2620 v4 (8コア) x 2
32GB RAM
GeForce GT 730 1GB GDDR5
CentOS 6.9 (64bit)
NCAR Command Language Version 6.3.0
for WRF3.7.1, WPS3.7.1
  openmpi-1.8.x86_64 とその-devel
  mpich.x86_64 3.1-5.el6とその-devel
  gcc version 4.4.7 (とgfortran)
for WRF3.9, WPS3.9
  Open MPI v2.1.1
  gcc version 4.9.2 (とgfortran; devtoolset-3使用)
 NetCDF v4.4.1.1, NetCDF (Fortran API) v4.4.4
Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) 
Python 3.6.0 on virtualenv
GNU bash, version 4.1.2(2)-release (x86_64-redhat-linux-gnu)
date (GNU coreutils) 8.4 
tmux 1.6-3.el6
GNU Wget 1.12

状況

  • wgetでファイルを取得時、既存のファイルがある場合に".1"のようなファイルができる
  • ".1"のようなファイルを作らないようにする

-ncオプション

When running Wget without -N, -nc, -r, or -p, downloading the same file in the same directory will result in the original copy of file being preserved and the second copy being named file.1.

上記記載の通り、-ncオプション付きでwgetを実行すると、ファイル既存時に".1"付きファイルは生成されなくなった。

注意点

既存のファイルがサイズの小さい不完全なファイルの場合であっても、取得済となり取得は行われない。

ファイルが不完全な場合は別途検討が必要。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0