BASH_SRV Telegram 106
⚙️ Быстрое сравнение файлов на серверах 🔁

Нужно сравнить конфиги или скрипты на двух серверах? Вместо ручного копирования — вот способ сделать это с помощью ssh и diff:


diff <(cat /etc/nginx/nginx.conf) <(ssh user@remote-server 'cat /etc/nginx/nginx.conf')


🔍 Что делает:

- Сравнивает файл на локальном сервере с файлом на удалённом
- Показывает различия, как обычный diff

💡 Удобно для:

- Проверки целостности конфигов
- Поиска отличий после миграции
- Аудита изменений

📦 Работает с любыми текстовыми файлами. Поддерживает также sudo внутри ssh:


diff <(cat /etc/fstab) <(ssh user@remote 'sudo cat /etc/fstab')


🧠 Совет: если нужно сравнивать много файлов — оберните в скрипт и перебирайте пути в цикле.

👉@bash_srv
👍72



tgoop.com/bash_srv/106
Create:
Last Update:

⚙️ Быстрое сравнение файлов на серверах 🔁

Нужно сравнить конфиги или скрипты на двух серверах? Вместо ручного копирования — вот способ сделать это с помощью ssh и diff:


diff <(cat /etc/nginx/nginx.conf) <(ssh user@remote-server 'cat /etc/nginx/nginx.conf')


🔍 Что делает:

- Сравнивает файл на локальном сервере с файлом на удалённом
- Показывает различия, как обычный diff

💡 Удобно для:

- Проверки целостности конфигов
- Поиска отличий после миграции
- Аудита изменений

📦 Работает с любыми текстовыми файлами. Поддерживает также sudo внутри ssh:


diff <(cat /etc/fstab) <(ssh user@remote 'sudo cat /etc/fstab')


🧠 Совет: если нужно сравнивать много файлов — оберните в скрипт и перебирайте пути в цикле.

👉@bash_srv

BY Bash Советы




Share with your friend now:
tgoop.com/bash_srv/106

View MORE
Open in Telegram


Telegram News

Date: |

In the “Bear Market Screaming Therapy Group” on Telegram, members are only allowed to post voice notes of themselves screaming. Anything else will result in an instant ban from the group, which currently has about 75 members. Telegram is a leading cloud-based instant messages platform. It became popular in recent years for its privacy, speed, voice and video quality, and other unmatched features over its main competitor Whatsapp. Hui said the time period and nature of some offences “overlapped” and thus their prison terms could be served concurrently. The judge ordered Ng to be jailed for a total of six years and six months. Find your optimal posting schedule and stick to it. The peak posting times include 8 am, 6 pm, and 8 pm on social media. Try to publish serious stuff in the morning and leave less demanding content later in the day. With Bitcoin down 30% in the past week, some crypto traders have taken to Telegram to “voice” their feelings.
from us


Telegram Bash Советы
FROM American