• 1 Post
  • 9 Comments
Joined 2 months ago
cake
Cake day: February 5th, 2025

help-circle

  • One thing about the thumbdrives, a LOT of features did not work for me when running live bootable, and it almost put me off. Then I made the actuall full install and a lot of the stuff that had not worked now did. Just so people understand the live bootables are very much just a demo, and doesn’t say much about compatibility really.


  • Nice I didn’t know that ^^ should probably learn at least the basic bash operators, I am just hacking together the different commands I happen to know at the moment really

    Edit: why echo instead of printf?

    This was causing a lot of issues with newlines, like when I fetched the log to view it my $ was right after the log entry so I switched it back. But it is probably useful in the future to use >> instead :)






  • It is not as cryptic as it sounded I just explained it badly.

    Log everything you do in human readable text, because realistically as a beginner going through machine generated logs is not very fun, and .bash_history will be filled with stuff that isn’t relevant always.

    It is just a bash script that logs a message with the current date to a file I can access from MacOS as well (on the shared partition) so that I can see what I did if I mess up too bad…

    Edit:

    Here it is:

    # Log argument to changelog.txt with current date and time.
    
    function log()
    {
    	local changelog="/run/media/jamie/DUAL/changelog"
    	local text="$(cat $changelog)" 
    	if [ "$1" == "--view" ]; then
    		cat $changelog
    	else
    		printf "$text\n$(date +%D:%H:%M): $1\n" > $changelog
    	fi
    }
    

    Each line looks like this: 03/16/25:11:49: Running dnf upgrade

    I will probably add some stuff so I can get the last 5 lines or something if I want, but at the moment this is really fine.