I am trying to mirror directories with lftp but I don't want to download filetypes that are notoriously large like .mp4 and .swf. But I am having trouble with the regex - and seeming like the exclude-glob too. Both of them download all files.
What I tried:
/usr/local/bin/lftp -u user,pass -e 'mirror -x ^(\.mp4|\.swf)$ $src $dest' ftp.host
&&
/usr/local/bin/lftp -u user,pass -e 'mirror -X swf $src $dest' ftp.host
Asked by Carter
(121 rep)
Jul 22, 2015, 07:37 PM
Last activity: Jul 9, 2025, 10:08 PM
Last activity: Jul 9, 2025, 10:08 PM