• 1 Post
  • 80 Comments
Joined 1 year ago
cake
Cake day: June 19th, 2023

help-circle




  • If I understand the problem correctly it has a pretty simple solution that I have done before. Make a new partition on the destination and dd if=/dev/diskAsB of=/dev/diskXsY where A is the source disk and B is the source partition and X is the destination disk and Y is the destination partition. You may have to run fsck on the destination afterwards and maybe a gpt repair tool.

    Honestly though, since it’s an ext filesystem, if it were me I’d just mount the source and dest and rsync.




  • I had the same experience on my one gui Ubuntu machine. I also have several headless machines, and due to some shared libraries I always ended up with snapd installed even though none of the packages I was running were installed through snap. I always found it through the mount point pollution that snapd does.



  • It’s not a typo. The first section of the regex is a matching section, where a dot means “match any character”, and an escaped dot is a literal dot character. The second section is the replacement section, and you don’t have to escape the dot there because that section isn’t matching anything. You can escape it though if it makes the code easier to read.

    rename is written in Perl so all Perl regular expression syntaxes are valid.

    However, your comment did make me realize that I hadn’t escaped my dot in the third example! So I fixed that.




  • Check out rename

    $ touch foo{1..5}.txt
    $ rename -v 's/foo/bar/' foo*
    foo1.txt renamed as bar1.txt
    foo2.txt renamed as bar2.txt
    foo3.txt renamed as bar3.txt
    foo4.txt renamed as bar4.txt
    foo5.txt renamed as bar5.txt
    $ rename -v 's/\.txt/.text/' *.txt
    bar1.txt renamed as bar1.text
    bar2.txt renamed as bar2.text
    bar3.txt renamed as bar3.text
    bar4.txt renamed as bar4.text
    bar5.txt renamed as bar5.text
    $ rename -v 's/(.*)\.text/1234-$1.txt/' *.text
    bar1.text renamed as 1234-bar1.txt
    bar2.text renamed as 1234-bar2.txt
    bar3.text renamed as 1234-bar3.txt
    bar4.text renamed as 1234-bar4.txt
    bar5.text renamed as 1234-bar5.txt
    




  • Michigan lakes area. It is sometimes really windy and really cold for long periods of time. The kind of climate where we get ice in the inside of our windows. Any mechanics needed to have a mechanical doorbell would also let in cold air.

    Edit: apparently there are some that have mechanics that pass through the wall that are similar to a door handle and can be sealed up pretty well. Very cool!