Troubleshooting:
1) create/enable 'Connector' in 'Exchange'
Show all > Exchange > EAC (Exchange Administrative Control) > Mail flow > Connectors
2) check into created connector if enabled an option like 'keep Exchange headers'
Troubleshooting:
1) create/enable 'Connector' in 'Exchange'
Show all > Exchange > EAC (Exchange Administrative Control) > Mail flow > Connectors
2) check into created connector if enabled an option like 'keep Exchange headers'
rsync -zarv --prune-empty-dirs --include "*/" --include="*.gif" --exclude="*" ./ ../gifs/
We need it for loading files directly from one remote server to another one where we have SSH access.
SSH access from a Workstation -> Server1 -> rsync loading files -> Server2
ssh -v username@server1
find an identity SSH key for sure
ssh-add <the_key>
ssh -A username@server1
run with A option for allowing forwarding keys
rsync -azP --exclude '.4y8-folder' --exclude 'file.tar.gz' pub/media/ username@server2:pub/media/
if [ $(expr $(ls -1 /test/111 | wc -l | tr -d ' ')) -gt 10 ]; then rm $(ls -d -1 -At /test/111/* | tail -n $(expr $(ls -1 /test/111 | wc -l | tr -d ' ') - 10)) ; fi
to crontab
/bin/bash -c "if [ $(expr $(ls -1 /test/111 | wc -l | tr -d ' ')) -gt 10 ]; then rm $(ls -d -1 -At /test/111/* | tail -n $(expr $(ls -1 /test/111 | wc -l | tr -d ' ') - 10)) ; fi"
Check rsync --help whether it supports --files-from= option
lst content
./folder-source/1/1
./folder-source/2/2
...
cd to a folder where folder-source as a sub-folder (it's an explanation of period "." in rsync command)
rsync --files-from=/tmp/lst . /app/var/folder-sync
remove only *.dat and *.csv files older than 4 moths
find /path -type f -mtime +120 \( -name '*.dat' -or -name '*.csv' \) -exec rm '{}' ';'
or move the files, but please be aware if destination is wrong or some bad happens then you'll lose files
find /path -type f -mtime +120 \( -name '*.dat' -or -name '*.csv' \) -exec mv '{}' /destination/ ';'