Could LVM creation format my disk?

I am new to LVM. I am Ubuntu user. This is my disk

sda      8:0    0 465,8G  0 disk  ├─sda1   8:1    0   512M  0 part /boot/efi └─sda2   8:2    0 465,3G  0 part / sdb      8:16   0 931,5G  0 disk  sdc      8:32   0 111,8G  0 disk  └─sdc1   8:33   0 111,8G  0 part /media/miki/main sr0     11:0    1  1024M  0 rom  

My pvs

sudo pvs   PV         VG Fmt  Attr PSize   PFree     /dev/sdb      lvm2 ---  931,51g 931,51g 

If I go for

sudo pvcreate /dev/sda 

then add volume to volumes group. Last step would be to create logical volumes from the volume group. Will my disk content be deleted or not? How to protect my data? All the examples I have found start from unformatted disks,some others mention migrations and so on…

How to format a SP Online List Name ( Header ) using JSON via Format View?

I have used JSON to format most of the columns on a list and then some using “Format Current View” and “Format This Column” however I’ve scoured the web looking for a solution to formatting the List Title on a SharePoint Online List and can’t find a definitive way to accomplish this. Is there a way to do this using JSON?

enter image description here

Python program to convert a 24 hour format to 12 hour format

Given a string in a 24 hour format the program outputs a 12 hour format. The rules are:

  • The output format must be ‘hh:mm a.m.’ if it represnt before midday and ‘hh:mm p.m.’ after midday
  • When the hour is less than 10:00 you should not write a 0 before the hour, example: ‘9.05 a.m.’

For example:

12:30 -> 12:30 p.m. 09:00 -> 9:00 a.m. 23:15 -> 11:15 p.m.

The code:

import datetime def time_converter(time):     midday_dt = datetime.datetime.strptime('12:00','%H:%M')     time_dt = datetime.datetime.strptime(time, '%H:%M')      if time_dt >= midday_dt:         if time_dt >= datetime.datetime.strptime('13:00','%H:%M'):             hours, minutes = clamp_to_twelve(time_dt, midday_dt)             time = f'{hours}:{minutes}'         time += ' p.m.'     else:         if time_dt < datetime.datetime.strptime('10:00','%H:%M'):             time = time[1:]         if is_midnight(time_dt):             hours, minutes = clamp_to_twelve(time_dt, midday_dt)             time = f'{hours}:{minutes:02d}'         time += ' a.m.'     return time  def clamp_to_twelve(time_dt, midday_dt):     clamp_dt = time_dt - midday_dt     minutes, seconds = divmod(clamp_dt.seconds, 60)     hours, minutes = divmod(minutes, 60)     return [hours, minutes]  def is_midnight(time_dt):     return (time_dt >= datetime.datetime.strptime('00:00','%H:%M') and         time_dt <= datetime.datetime.strptime('00:59','%H:%M'))  if __name__ == '__main__':     assert time_converter('12:30') == '12:30 p.m.'     assert time_converter('09:00') == '9:00 a.m.'     assert time_converter('23:15') == '11:15 p.m.' 

What could be improved?

How to create email address in format of “me+foo@provider.com”?

I was looking on a person’s resume and he has put his email like this: foo+resume@gmail.com.

I am talking about that additional +resume. I want to know:

  1. How this type of email address works?
  2. How do I create email like that with my present Gmail address?

I tried creating an email address with + in between, but Gmail only allows letters, numbers and periods.

Format new parition of drive with xfs version 4 in Linux

I am working on an arcade machine and it cannot be updated unfortunately. A drive has corrupted data on it and in order to delete it I need to re-partition that drive. (I know it’s the data and not the drive because I have used dd to clone the partition onto another drive and the data can still not be removed with rm -rf /folder)

In order to fix this I need to do mkfs.xfs but I need to set the version. When just using mkfs.xfs it sets it to 5 automatically.

Reading though the documentation on mkfs.xfs I see no way to change the version. https://www.systutorials.com/docs/linux/man/8-mkfs.xfs/

I am looking any solutions, I can use slax, ubuntu or redhat to solve this. (I currently have machines with all 3)

xfs_db tells me the version is V4,NLINK,ALIGN,DIRV2

strftime() format dates not working in Custom Keyboard Shortcut

We were using a Custom Shortcut under the Keyboard settings in Ubuntu 16.04 that allowed us to automatically initiate an ffmpeg screen recording with Super-Z. The command we were using was:

gnome-terminal -x sh -c 'ffmpeg -video_size 1920x1080 -framerate 25 -f x11grab -i :0.0 -f pulse -ac 2 -i default ~/Videos/`date +%Y-%m-%d_%H-%M-%S`_screenrecording.mkv; exec bash' 

Now that we upgraded to Ubuntu 18.04 the command is returning blank values for the date variables. Instead of returning a file with the name 2019-05-20_17-41-56_screenrecording.mkv, for example, it returns the a file name of --_--_screenrecording.mkv.

We tested the command straight from the terminal and it works fine.

Any ideas why the Custom Shortcut wouldn’t have access to the date variables? Thanks!