• 1 Post
  • 223 Comments
Joined 3 years ago
cake
Cake day: June 15th, 2023

help-circle



  • My version is definitely wordier, but I like it.

    add-alias() {
      if [[ -z "$1"  ||  -z "$2" ]]; then
        echo "Useage: add-alias <alias_name> \"<command_to_alias>\""
        return 1
      fi
      echo "alias $1='$2'" >> ~/.bash_aliases
      source ~/.bash_aliases
      echo "Alias '$1' for command '$2' added and sourced."
      
    }
    

    And, of course, the first thing I test it with is $ add-alias alias-add add-alias.








  • The dev entry point changing like that means that it disconnected and then reconnected, which shouldn’t have anything to do with the specific file system on the drive. That really makes it sound like the drive isn’t getting quite enough power, which causes a brown out, which Linux detects as the drive getting unplugged and coming back, which is why it gets a new dev entry.

    A look through the usb logs by using something like usbrip would confirm that.









  • While this feels like bait, I’m going to take it. Yes, there is a huge benefit to learning and using a terminal if you use a computer as a tool for creating and working instead of passively consuming entertainment. Organizing and searching files of any sort, building applications, writing without distraction, working with remote devices, and just generally using your computer as a tool instead of a fancy TV are all made easier, faster and more efficient if you can use a terminal. The unix philosophy gives you the ability to do things by stringing together a few commands that you might have to find a specialized program for, if it even exists in GUI land.

    That’s not to say the GUI’s aren’t great for a lot of things. They are! But they also lock you into doing things in a few predetermined ways rather than letting you develop the skills and techniques for exploring new spaces.