rsync -avS --progress -h fromPath/fileToCopy destPath/
Code language: Bash (bash)
Monthly Archives: June 2021
Take image of a partition?
sudo dd if=/dev/sde1 | bzip2 –best > $(date +%Y%m%d_%H%M%S)_sde1-backup.bz2
or only read the used space and store it:
e2image -Qap /dev/sde1 sde1.qcow2
bzip2 -z hde1.qcow2
Convert it to a raw image (unzip it first)
e2image -r hde1.qcow2 hde1.raw
Installing the amdgpu driver complanes about hwe thingy.
You probably have upgraded your system from 18.04 to 20.04?
If you remove xserver-xorg-hwe-18.04, the driver should install.
Colorfy text from output
egrep –color “\b(PASS|FAIL)\b|$”
Turn off the encryption on Android phone
Go to Settings->Security , hit the “decrypt” button
Reset phone and the process will take about 20 minutes, leave the charger in!
The data should be in there. ref
If no “crypt” button is found, then forget it
Backup all data on Android phones
adb backup -shared -all -f ./Backupfilename.ab
Howto mount it on a computer
dd if=Backupfilename.ab skip=512 bs=128k iflag=nocache,skip_bytes oflag=nocache,append conv=notrunc of=OutfileimageEXT4.img
do this with all the ab files it creates, change the if= to the next file, leave the parameters as is.
Mount
sudo mount -t ext4 -o loop OoutfileimageEXT4.img /media/username/mountpoint_for_your_image
How to set big panning
xrandr –output LVDS1 –panning 1920×1080 –size 1920×1080
Get correct value from negative numbers in modulus
a=-1, b=5 => ((b+(a%b))%b) = 4
Nice coding fonts
Jetbrains Mono
Github complains about private email address and cannot push
Find your email here: https://github.com/settings/emails
Get your ID here https://api.github.com/users/username
change globaly
git config –global user.email “{ID}+{username}@users.noreply.github.com”
or only the spesific local repo
git config user.email “{ID}+{username}@users.noreply.github.com”
git commit –amend –reset-author -m “message for log”
git push