FreeBSD – increasing size of root disk with KVM/QEMU

Here is how to to increase the size of the disk for FreeBSD. I am using FreeBSD 12.3 here running inside a Fedora Linux.  Here are some starting requirements One needs to have qcow2 type disk. the virtual machine must be shutdown No snapshots against the virtual machine So, I cloned out the machine to test: [jon2allen@fedora Downloads]$ ll freebsd*.qcow2 […]

Find command – listing last modify path with full dir

Some examples of this command from Linux Debian and FreeBSD   Here is how to do this with GNU Linux – %p gives full path name   user1@f1-google-joniowa:~$ find . -name “weather_obs.log” -printf “%p\t%TY-%Tm-%Td\n” ./test27/weather_obs/weather_obs.log 2023-05-16 ./test26/weather_obs/weather_obs.log 2022-12-08 ./test28/weather_obs/weather_obs.log 2023-02-28 ./test25/weather_obs/weather_obs.log 2022-08-18 ./python/weather_obs/weather_obs.log 2021-05-24 ./test24/weather_obs/weather_obs.log 2022-11-22 Here is a bsd version –   uses exec   [user1@freebsd12_3 ~]$ find . -name […]

finding files and using tar for backup.

The most common solution is to use find with xargs to backup Something like this: find /var/www/html/ -type f -name my*.csv -print0 | xargs -0 tar cfvzP /backupdir/backupfile The more files you have, especially over 1000 – this will produce weird results.  Number of files in the archive doesn’t match the output of the find xargs will split the input […]

Pandas – convert from dataframe append to concat.

the latest Pandas gives warning about append being depreciated. FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead.   The main difference is that concat expects an iterable list. monnth_df = pd.concat( [ month_df,obs1 ], ignore_index=True) # month_df = month_df.append(obs1, ignore_index=True)  

ping: socket: Operation not permitted

Got error with Debian Bullseye jon2allen@lamp2c$ ping www.yahoo.com ping: socket: Operation not permitted to allow all users to ping again echo “0 2147483647” > /proc/sys/net/ipv4/ping_group_range to make permanent echo “net.ipv4.ping_group_range = 0 2147483647” >> /etc/sysctl.conf Here is where it is documented   https://lore.kernel.org/lkml/20110518174959.GA6019@albatros/ https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt

Bitnami VM – how to enable SSH for password ( notes )

There is a special procedure. ( debian ) SSH is disabled by default.  If you download a VM from bitnami sudo rm -f /etc/ssh/sshd_not_to_be_run sudo systemctl enable ssh sudo systemctl start ssh So, to enable password. edit /etc/ssh/sshd_config Uncomment the password field # To disable tunneled clear text passwords, change to no here! PasswordAuthentication yes #PermitEmptyPasswords no To add a […]