this post was submitted on 09 Aug 2023
858 points (98.5% liked)

linuxmemes

21194 readers
1465 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack members of the community for any reason.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn. Even if you watch it on a Linux machine.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, and wants to interject for a moment. You can stop now.

  • Please report posts and comments that break these rules!

    founded 1 year ago
    MODERATORS
     
    top 50 comments
    sorted by: hot top controversial new old
    [–] [email protected] 181 points 1 year ago* (last edited 1 year ago) (6 children)

    --no-preserve-root is a security option to keep you from accidentally removing all your files. Make sure you always use it along side the -f option and -r which stands for rescue - meaning rm will create a rescue copy of the deleted data.

    [–] [email protected] 85 points 1 year ago (2 children)

    It means No! Preserve Root.

    [–] [email protected] 12 points 1 year ago (1 children)

    I see you also know Lionel Hutz

    load more comments (1 replies)
    load more comments (1 replies)
    [–] [email protected] 27 points 1 year ago (1 children)

    the / means 'working directory only', a security feature to prevent accidently using absolute paths.

    [–] [email protected] 5 points 1 year ago

    Really clever

    [–] [email protected] 25 points 1 year ago (1 children)

    Use sudo before rm to improve efficiency.

    [–] [email protected] 24 points 1 year ago (1 children)

    Sudo is short for “super do”, which means “do this at super speed”

    [–] [email protected] 4 points 1 year ago

    Too bad they never added the lu to make it sudolu , to execute at ludicrous speed

    [–] [email protected] 11 points 1 year ago (2 children)

    I’m very new to Linux; could you explain what this does for me?

    [–] [email protected] 35 points 1 year ago (1 children)

    -r means delete recursively. rm will by default only remove files, but with this flag, it'll also delete all the folders, subfolders, and the files in those.

    --no-preserve-root disables a security check. A few years ago, this flag didn't exist. If you ran rm -r /, everything on your system would be deleted, provided the user had permissions. Now, / is treated specially and rm will refuse to perform a recursive delete on it without the --no-preserve-root flag.

    -f means force and disables any prompts.

    rm -rf --no-preserve-root / would delete every file on your system.

    [–] [email protected] 15 points 1 year ago (1 children)

    Thank you! That’s funny and horrifying, as a complete newbie.

    [–] [email protected] 7 points 1 year ago (1 children)

    I installed Ubuntu on a spare computer a few weeks ago just to rm -rf / it. It was quite fun seeing the os slowly killing itself :)

    [–] [email protected] 5 points 1 year ago* (last edited 1 year ago) (1 children)

    You should try dd if=/dev/random of=/dev/sda some time :P

    [–] [email protected] 3 points 1 year ago (1 children)

    Should I ask what it does before or after I use it? :)

    [–] [email protected] 5 points 1 year ago (1 children)

    Fills the hard drive with randomly-generated garbage.

    [–] [email protected] 3 points 1 year ago

    Specifically, most likely the OS hard drive, since that's usually sda

    [–] [email protected] 10 points 1 year ago* (last edited 1 year ago) (1 children)

    --no-preserve-root

    disables the wipe your system protection. Without this option rm can only wipe current directory if you input / as a location.

    -f

    means force, will not prompt the user for any reason.

    -r

    means recursive, rm will enter any directory selected and delete all the contents.

    rm -rf --no-preserve-root /

    The above command WILL wipe your system. It will delete all files your user has access to, and it will give you no feedback warning you what's going on. Be careful.

    [–] [email protected] 5 points 1 year ago

    Oh jeebus! Hahaha. Thank you so much for the explanation! I am extremely careful in terminal. I don’t find myself there often now that I’ve got my web apps set up.

    Now to learn how to successfully install something using Docker… There’s so many VARIABLES in Portainer to get something installed! I have not had one success as of yet, but I’m only on my first week of learning. Got it running as a file server successfully, though!

    Every TV in my house now gets King of the Hill RANDOMIZER and it’s bliss.

    [–] [email protected] 6 points 1 year ago

    OML, this is excellent.
    Please, is there a !shitty_linux_advice community?

    load more comments (1 replies)
    [–] [email protected] 123 points 1 year ago (2 children)

    Mozilla recently tried to integrate some AI stuff into its MDN. The corresponding Github issue is correctly titled "MDN can now automatically lie to people seeking technical information".

    ¯\_(ツ)_/¯

    https://github.com/mdn/yari/issues/9208

    [–] [email protected] 16 points 1 year ago

    That's amazing that they would consider auto-generated responses to be appropriate in something which is supposed to be reference documentation. We are a good way from that type of querying and explanation being reliable.

    [–] [email protected] 79 points 1 year ago (2 children)

    Using AI is much more hit and miss than executing the first google result blindly, which has been available since decades. And google didn't cost us our jobs, so I am not afraid of AI.

    [–] [email protected] 23 points 1 year ago (1 children)

    I think AI will cause a massive wave of employment changes. I think people and companies are currently overreacting as to where/how it can and should be used to be effective, but capitalism will make sure in a few more years it is placed where it makes corporations the most money, regardless (and maybe in spite?) of the cost of jobs.

    [–] [email protected] 8 points 1 year ago (1 children)

    Spoiler, they're going to use it to sell people stuff.

    [–] [email protected] 4 points 1 year ago

    Yeah the biggest practical use of the current generation of LLMs is online astroturphing and viral marketing. AIs aren't reliable enough (yet) for things that require correctness, but they're damn good at saying a thing you want said over and over in countless different ways.

    Customer service (aka customer support chat bots) will also try to make use of it, no doubt, but I'm skeptical about how much they'll actually trust it for that. All it'll take is one person figuring out how to make the Chipotle chat bot spout nazi propoganda or some shit before they go back to "dumb" chat bots lol

    [–] [email protected] 18 points 1 year ago (2 children)

    Search engines like Google have cost many people there job; the list of now-rare positions and/or duties associated with a position (thereby thinning the need for such employment) that search engines have replaced is long.

    [–] [email protected] 13 points 1 year ago (3 children)

    Yeah, when's the last time anyone used a travel agent (though in fairness Google wasn't the only reason that job fell into obscurity, as sites like Expedia also contributed).

    [–] [email protected] 12 points 1 year ago (4 children)

    Travel agents are still widely used by small and medium sized businesses. It's much faster to say "Get these two people to London for these days" in an email instead of manually looking for flight tickets and hotels.

    But I haven't heard of anyone using them for private trips in a long time.

    [–] [email protected] 3 points 1 year ago

    In 20 years of business travel across many countries and industries, I have been happy with the agent's choices maybe four times. These days I skip the corp agent and just book tickets myself, then expense them. Fewer layovers, better seat choices, and having my own name on travel plans is a ton better than I get from someone who is just trying to close a ticket and get someone from A to B.

    A nice side effect is that my trips are usually cheaper than colleagues who use the agent, so I never have to justify why I did it myself.

    load more comments (3 replies)
    [–] [email protected] 4 points 1 year ago

    travel agents are still around, I know one

    and honestly, from what I can tell, you would be a fool not to use one if you are planning to go somewhere you have never been and want it all mapped out for you. They have access to things that you cant find in a google search

    load more comments (1 replies)
    [–] [email protected] 11 points 1 year ago

    Remember when googling was done by (assuming this info couldn't be found in the lexicon) calling directly to the source and asking the receptionist?

    I remember my dad and uncle couldn't decide when they thought Coca Cola was founded, so they went to the phonebook, found the number for Coca Cola and just asked. They were happy to help, too. I also remember calling directly to the publisher for Disney comics to ask how much certain comics were, and they sent us a form in the mail that we would fill out to order the specific books we wanted, which then arrived in the mail like 2 weeks later. Pretty much the internet but with extra steps, mandatory human interaction and extremely long wait times lol.

    [–] [email protected] 45 points 1 year ago (1 children)

    Don't forget -r for when you -really want to delete that file

    [–] [email protected] 39 points 1 year ago (1 children)

    Use --no-preserve-root if you want to keep a backup of the file offsite in Norway.

    [–] [email protected] 29 points 1 year ago (2 children)
    [–] [email protected] 4 points 1 year ago
    load more comments (1 replies)
    [–] [email protected] 28 points 1 year ago (1 children)

    Just because Google is stupid doesn't mean Bing can't do it:

    load more comments (1 replies)
    [–] [email protected] 25 points 1 year ago (3 children)

    Obilgatory reminder to actually read the manpage. They were written for a reason. If you can't do that then either install a version of the "tldr" program like "tealdeer" or use curl cheat.sh/

    [–] [email protected] 11 points 1 year ago (1 children)

    I refuse to read manpages because I hate mansplaining and I wont have The Man tell me what to do.

    [–] [email protected] 7 points 1 year ago (2 children)

    I know right, like give me womanpages I'd read those

    [–] [email protected] 4 points 1 year ago

    I mean... alias woman=man?

    load more comments (1 replies)
    [–] [email protected] 5 points 1 year ago

    Personally I find the built in --help option to be much more useful than manpages. Manpages are excessively wordy and almost never have info I'm looking for without having to search.

    Built in help options usually concisely list all the options with a brief explanation of what they do. That's perfect.

    load more comments (1 replies)
    [–] [email protected] 24 points 1 year ago* (last edited 1 year ago) (1 children)

    Ah yes -f for foncirmation

    [–] [email protected] 7 points 1 year ago

    My brain once swapped the letters F and L in my head and I typed

    iptables -F

    Instead of -L.

    The standard input policy was drop. It was a VPS and I didn't have access to the management panel. Fun times.

    [–] [email protected] 6 points 1 year ago (1 children)

    Just make an alias that mv's the file to a "trash" folder.

    [–] [email protected] 7 points 1 year ago (1 children)

    First thing I do is make a recycle bin alias. Everytime.

    It's wild it doesn't come like that out of the box.

    [–] [email protected] 3 points 1 year ago

    Especially on "noob" friendly distros like Ubuntu or honestly all desktop (non-server) distros. Make it an install option/flag at least.

    Maybe someone smarter than me can explain why it's a bad idea.

    [–] [email protected] 3 points 1 year ago* (last edited 1 year ago) (2 children)

    while i get that at some point chatgpt could have been mildly good at bolierplate programming, it's much worse at chemistry. just ask it how to make aspirin

    [–] Kayel 4 points 1 year ago (2 children)

    I'm assuming they've blocked out chemistry from the training data. It's crazy how easy it is to make many things from common chemicals, the liability would be insane.

    load more comments (2 replies)
    [–] [email protected] 3 points 1 year ago* (last edited 1 year ago) (2 children)

    Is this answer correct? I can't judge, as I have no idea how aspirin active compound is synthetized.

    Answer from gtp-4:

    Aspirin, also known as acetylsalicylic acid (ASA), can be synthesized through a chemical reaction involving salicylic acid and acetic anhydride. Here's the general process:

    1. Salicylic Acid Preparation (if needed): If starting from other compounds like phenol, salicylic acid may need to be synthesized first.
    2. Acetylation of Salicylic Acid: Salicylic acid is reacted with acetic anhydride. [ \text{{salicylic acid}} + \text{{acetic anhydride}} \rightarrow \text{{acetylsalicylic acid}} + \text{{acetic acid}} ]
    3. Purification: The crude product is often purified by recrystallization, typically using a solvent like ethanol or water.
    4. Drying: The purified aspirin is dried to remove any remaining solvent.
    5. Characterization: The synthesized aspirin may be characterized using methods like melting point determination, infrared spectroscopy, or other analytical techniques to ensure purity and identity.

    In a laboratory setting, the reaction is often catalyzed by an acid such as sulfuric acid, which speeds up the process. The reaction is typically carried out at a moderate temperature, such as around 80°C.

    Safety precautions must be taken as the chemicals involved can be corrosive, and proper waste disposal is necessary.

    load more comments (2 replies)
    load more comments
    view more: next ›