« Linux tips » : différence entre les versions
De Mathux
Ligne 27 : | Ligne 27 : | ||
which results in: | which results in: | ||
21.6GiB 0:03:41 [ 106MiB/s] [============> ] 36% ETA 0:06:30 | 21.6GiB 0:03:41 [ 106MiB/s] [============> ] 36% ETA 0:06:30 | ||
or use dd if=/dev/sdb of=/dev/sdc status=progress | |||
= Revert ssh = | = Revert ssh = | ||
/usr/bin/autossh -M 0 -NR 2222:localhost:22 -o "ServerAliveInterval 45" -o "ServerAliveCountMax 2" LOGIN@SERVER | /usr/bin/autossh -M 0 -NR 2222:localhost:22 -o "ServerAliveInterval 45" -o "ServerAliveCountMax 2" LOGIN@SERVER |
Dernière version du 31 août 2020 à 16:09
Create Swap file
sudo dd if=/dev/zero of=/swapfile bs=1M count=512 && sudo mkswap -f /swapfile && sudo swapon /swapfile
then add it to fstab
Edit with cat
with variable expansion
cat > myfile << EOF
typewhatiwant $user
EOF
without variable expension
cat > myfile << "EOF"
typewhatiwant mmaret
EOF
dd with progress bar
pv -tpreb /dev/sdb | dd of=/dev/sdc
which results in:
21.6GiB 0:03:41 [ 106MiB/s] [============> ] 36% ETA 0:06:30
or use dd if=/dev/sdb of=/dev/sdc status=progress
Revert ssh
/usr/bin/autossh -M 0 -NR 2222:localhost:22 -o "ServerAliveInterval 45" -o "ServerAliveCountMax 2" LOGIN@SERVER