Saturday, 1 October 2022

List of recently changed Git tracked files in Bash

Forgot why I needed this, but isn't it a beauty :)

git whatchanged --since '2022-03-01' --oneline | grep "whatever_..." | uniq | sort

(Most likely largely via StackOverflow)

Friday, 30 September 2022

New to me too - create bootable using cp

Was just Googling around if I forgot anything about using dd for creating a bootable, and behold:

You can even create a bootable USB stick with cp (it seems much more straightforward for me than dd or a GUI):

sudo cp path/to/ISO /dev/sdX

Also:

That was really new to me. Together with progress unix.stackexchange.com/a/301329/87264 it shows progress, too

Source: AskUbuntu

Well, truly useful ... let's see ...!

Saturday, 2 July 2022

Ubuntu is user friendly

Looks like I'm not a user though :) can't just connect my Android phone right away ... really?

See Can't transfer files from Android to Ubuntu via USB cable - Ask Ubuntu

"After digging around I found that Ubuntu doesn't include MTP support by default, which is needed to do general file transfers with Android. I opened a terminal and typed:

sudo apt-get install gmtp

Yea' that was kind of my 2nd thought. 3rd?

Friday, 24 June 2022

You actually CAN print multiple lines into a file using (a single, meaningful line of) bash

But why it's got to get so complicated ... :)

 

Anyway, note:

echo -e "Hello \nWorld \n" >> greetings.txt

 

Or, alternatively just output each line with a separate echo statement and printing to append with the >> piper.

SO: shell - how to pipe commands in ubuntu