假设您将文件下载到~/img.txt
wget https://picsum.photos/200 -O ~/img.jpg
图像文件被存储。现在想象你再试一次,但使用了错误的 URL
wget https://picsum.photooooooos/200 -O ~/img.jpg
然后删除/清空该文件。
如果 URL 返回 404 或者下载有任何错误,如何避免文件被覆盖?
假设您将文件下载到~/img.txt
wget https://picsum.photos/200 -O ~/img.jpg
图像文件被存储。现在想象你再试一次,但使用了错误的 URL
wget https://picsum.photooooooos/200 -O ~/img.jpg
然后删除/清空该文件。
如果 URL 返回 404 或者下载有任何错误,如何避免文件被覆盖?
我在增量备份中一直不明白的是,通过口是心非,修改后的本地文件是否会在备份存储中被覆盖,即增量备份是否可以恢复已修改文件的旧版本?
我正在做每日增量备份和每月完整备份,两者都是口是心非
每日备份脚本(中/etc/cron.daily/
)
#!/bin/sh
adddate() {
while IFS= read -r line; do
printf '%s %s\n' "$(date):" "$line";
done
}
# be sure external drives are mounted
mount -a
# backup to HDD backup B, using duplicity
echo "\n\nBacking up /home and /etc into /mnt/backupB with duplicity (incremental backup)" | adddate >> /var/log/daily-backup.log 2>&1
export PASSPHRASE=****
duplicity --exclude='**/.cache/' --include /home --include /etc --exclude '**' / file:///mnt/backupB | adddate >> /var/log/daily-backup.log 2>&1
unset PASSPHRASE
每月备份脚本(中/etc/cron.monthly/
)
#!/bin/sh
adddate() {
while IFS= read -r line; do
printf '%s %s\n' "$(date):" "$line";
done
}
# be sure external drives are mounted
mount -a
# backup to HDD backup B, using duplicity
echo "\n\nBacking up /home and /etc into /mnt/backupB with duplicity (full backup)" | adddate >> /var/log/monthly-backup.log 2>&1
export PASSPHRASE=*****
duplicity full --exclude='**/.cache/' --include /home --include /etc --exclude '**' / file:///mnt/backupB | adddate >> /var/log/monthly-backup.log 2>&1
unset PASSPHRASE
我的问题是:何时何地使用口是心非验证?在增量或完全或两者之后?
我想从中提取所有bin
目录PATH
并将其设置为变量。我很困惑,因为所有目录都出现在一行中,:
但我只想要这些目录bin
。
/home/jo52900/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games:/opt/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/local/bin:/opt/universal/ucmdmgr/bin
我该怎么做?
rkhunter
正在发出警告/dev/shm/mono.*
。我在网络引用中找不到与 rkhunter 警告相关的该文件的任何地方。
[12:38:29] Checking /dev for suspicious file types [ Warning ]
[12:38:29] Warning: Suspicious file types found in /dev:
[12:38:29] /dev/shm/mono.1254: data
这是误报吗?
的输出df -h
Filesystem Size Used Avail Use% Mounted on
udev 7.8G 0 7.8G 0% /dev
tmpfs 1.6G 2.1M 1.6G 1% /run
/dev/sdb2 916G 357G 513G 41% /
tmpfs 7.8G 121M 7.7G 2% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
/dev/sdb1 511M 4.5M 507M 1% /boot/efi
/dev/sda1 1.8T 87G 1.7T 5% /mnt/HDD_Toshiba
tmpfs 1.6G 0 1.6G 0% /run/user/0
SynologyNas.local:/volumeUSB2/usbshare2-1 2.3T 1.6T 683G 71% /mnt/synologyDrive
tmpfs 1.6G 20K 1.6G 1% /run/user/121
tmpfs 1.6G 48K 1.6G 1% /run/user/1000