Вы ищете set reply_self = no
(что должно быть по умолчанию, но подтвердите, что вы и / или ваш дистрибутив не изменили его). Вам также может потребоваться использовать альтернативы
, чтобы Матт знал все ваши адреса электронной почты.
{{ 1}}
Крутые ребята сказали, что rsync
работает как шарм:
rsync -auv --exclude '.svn' --exclude '*.pyc' source destination
Исходный ответ: https://superuser.com/a/29437/483428
все в порядке, другие крутые ребята сказали, что rsync
не решение, когда сама файловая система не поддерживает длинные имена. Замечу, что rsync
не является метафизическим низкоуровневым сверхсекретным инструментом, созданным богами (кстати, таких инструментов для Windows много;)
Итак, вот короткий скрипт на python (как я знаю, в Ubuntu по умолчанию установлен python 2.7), который копирует все файлы из SRC
в DST
, и выводит имена файлов, вызвавших ошибки (в т.ч. , длинные имена)
copy.py
python copy.py SRC DEST
import os
import sys
import shutil
def error_on_dir(exc, dest_dir):
print('Error when trying to create DIR:', dest_dir)
print(exc)
print()
def error_on_file(exc, src_path):
print('Error when trying to copy FILE:', src_path)
print(exc)
print()
def copydir(source, dest, indent = 0):
"""Copy a directory structure overwriting existing files"""
for root, dirs, files in os.walk(source):
if not os.path.isdir(root):
os.makedirs(root)
for each_file in files:
rel_path = root.replace(source, '').lstrip(os.sep)
dest_dir = os.path.join(dest, rel_path)
dest_path = os.path.join(dest_dir, each_file)
try:
os.makedirs(dest_dir)
except OSError as exc:
if 'file exists' not in str(exc).lower():
error_on_dir(exc, dest_dir)
src_path = os.path.join(root, each_file)
try:
shutil.copyfile(src_path, dest_path)
except Exception as exc:
# here you could take an appropriate action
# rename, or delete...
# Currently, script PRINTS information about such files
error_on_file(exc, src_path)
if __name__ == '__main__':
arg = sys.argv
if len(arg) != 3:
print('USAGE: python copy.py SOURCE DESTINATION')
copydir(arg[1], arg[2])