Debian – See all files in packages with word in them – double xargs
Final: (PKG="linux"; dpkg -l | grep $PKG | awk '{print $2}' | xargs -I %% /bin/bash -c 'echo "—%%—-"; dpkg -L "%%" | xargs -I @@ /bin/bash -c "[[ -f '@@' ]]Read More…
Final: (PKG="linux"; dpkg -l | grep $PKG | awk '{print $2}' | xargs -I %% /bin/bash -c 'echo "—%%—-"; dpkg -L "%%" | xargs -I @@ /bin/bash -c "[[ -f '@@' ]]Read More…
Check for line endings with od (also you can use other hex tools with -c option – which is the Printable Characters format) od -c file DOS: \r \n (carriage return andRead More…
The problem / error: When doing an rsync over ssh file transfer I get this error. # rsync -avhP -e "ssh -p 22 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" file root@someserver.com:file Warning: Permanently added '[root@someserver.com]:22,[24.155.888.155]:2022'Read More…
(I) Scrub: going thru the raid checking parity and correcting things. There are 2 types. check or repair. *check just reads everything and doesn’t trigger any writes unless a read error isRead More…
Watching samba locks script: smbstatus -L | head -n 2 | tail -n 1 | nl -v0; smbstatus -L | tail -n -3 | grep . | nl; # loop the commandRead More…
Let say you want to change the homehost and/or the name of a raid, for whatever reason. (one reason might be that you changed your system and so you want to matchRead More…
Problem: If you get this warning/error when you run the ssh command: $ ssh infotinks@192.168.0.100 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOINGRead More…
Mounting a BTRFS filesystem thats made of 2 devices. For example my data volume is made of md125 and md124 I can mount them like this usually # mount /dev/m124 /mnt orRead More…
Assumption: Assuming your using bash 4. However this will work with bash 3 as im not using anything too special. So your copying alot of things over to a remote system usingRead More…
Here we backup a linux folder /data with all of its data to a remote system. 7zip has the best compression (or some of the best), so we want to use that.Read More…