wget
我尝试一次性 从以下链接下载所有数据文件(.txt 文件) 。https://svn.sdss.org/public/data/eboss/DR16cosmo/tags/v1_0_0/likelihoods/
无论我尝试什么都没有成功。它只下载index.html
。我使用的是 ubuntu 20.04。有趣的是,如果我尝试下载wget
一个.txt
文件,它就会起作用。有什么帮助可以一次下载所有文件吗?
答案1
如果您想要该 Subversion 存储库中的所有文件(和文件夹?),为什么不使用 Subversion 客户端?
sudo apt install subversion
然后:
svn checkout https://svn.sdss.org/public/data/eboss/DR16cosmo/tags/v1_0_0/likelihoods/
这将为您提供该目录和子目录中的所有内容。
答案2
您还可以使用svn export
复制单个文件,并使用--force
破坏现有副本。
有时,当您想要将文件从 URL 拉到本地文件夹时,此方法非常方便,无论该文件夹是否是签出的 SVN 工作区文件夹:
@echo off
SETLOCAL EnableDelayedExpansion EnableExtensions
set WMSBRANCH01=D:\YourWorkspace\MY_OTHER_SVN_FOLDER_NAME
call :svnexp !WMSBRANCH01!
goto end
@rem === BEG:Function:svnexp =======================================================================
:svnexp varname
SETLOCAL
if "noclass" EQU "noclass%~1" (
echo Skipped svnexp called without an actual WMSBRANCH01 parameter value
) else (
echo Copying SVN autoconf files from MY_SVN_BRANCH_HAME in subversion repository to MY_OTHER_SVN_FOLDER_NAME workspace: %~1
@rem Use SVN to 'export' the files into the BDEV workspace folder from SVN using a URL instead of copying the file from an existing 11.5.3 workspace folder
svn export --force http://hostname.domain.com/svn/branches/MY_SVN_BRANCH_HAME/project/folder/build-aux/ar-lib %~1\project\folder\build-aux\ar-lib
svn export --force http://hostname.domain.com/svn/branches/MY_SVN_BRANCH_HAME/project/folder/build-aux/ax_check_openssl.m4 %~1\project\folder\build-aux\ax_check_openssl.m4
svn export --force http://hostname.domain.com/svn/branches/MY_SVN_BRANCH_HAME/project/folder/build-aux/ax_cxx_compile_stdcxx.m4 %~1\project\folder\build-aux\ax_cxx_compile_stdcxx.m4
svn export --force http://hostname.domain.com/svn/branches/MY_SVN_BRANCH_HAME/project/folder/build-aux/ax_cxx_compile_stdcxx_11.m4 %~1\project\folder\build-aux\ax_cxx_compile_stdcxx_11.m4
svn export --force http://hostname.domain.com/svn/branches/MY_SVN_BRANCH_HAME/project/folder/build-aux/ax_cxx_compile_stdcxx_17.m4 %~1\project\folder\build-aux\ax_cxx_compile_stdcxx_17.m4
svn export --force http://hostname.domain.com/svn/branches/MY_SVN_BRANCH_HAME/project/folder/build-aux/ax_pthread.m4 %~1\project\folder\build-aux\ax_pthread.m4
svn export --force http://hostname.domain.com/svn/branches/MY_SVN_BRANCH_HAME/project/folder/build-aux/compile %~1\project\folder\build-aux\compile
svn export --force http://hostname.domain.com/svn/branches/MY_SVN_BRANCH_HAME/project/folder/build-aux/config.guess %~1\project\folder\build-aux\config.guess
svn export --force http://hostname.domain.com/svn/branches/MY_SVN_BRANCH_HAME/project/folder/build-aux/config.sub %~1\project\folder\build-aux\config.sub
svn export --force http://hostname.domain.com/svn/branches/MY_SVN_BRANCH_HAME/project/folder/build-aux/depcomp %~1\project\folder\build-aux\depcomp
svn export --force http://hostname.domain.com/svn/branches/MY_SVN_BRANCH_HAME/project/folder/build-aux/install-sh %~1\project\folder\build-aux\install-sh
svn export --force http://hostname.domain.com/svn/branches/MY_SVN_BRANCH_HAME/project/folder/build-aux/missing %~1\project\folder\build-aux\missing
svn export --force http://hostname.domain.com/svn/branches/MY_SVN_BRANCH_HAME/project/folder/configure.ac %~1\project\folder\configure.ac
svn export --force http://hostname.domain.com/svn/branches/MY_SVN_BRANCH_HAME/project/folder/Makefile.am %~1\project\folder\Makefile.am
)
ENDLOCAL
exit /b
@rem === END:Function:svnexp =======================================================================
:end
@echo Done!