That’s really good! 🤣
alias arch-update='sudo pacman -Syu && Yay -Syu && flatpak update && sudo freshclam'
Isn’t
pacman -Syu
redundant if you runyay -Syu
afterwards? Also, justyay
is the same asyay -Syu
Probably. I’ll give your way a try. I never really thought about it much after writing it. Thanks!
It can be, but sometimes packages are removed from the official repos, but still available in AUR, only running
yay -Syu
will install the AUR versions of dependencies that are no longer needed, and can leave you with a bunch of unnecessary packages from AUR.If you run
pacman -Syu
on its own the unnecessary dependencies will be removed and you won’t get the AUR versions, and thenyay -Syu
will only update things you actually want from AUR.Yes but who cares, it works and that is all that matter.
If you would see my dotfiles, you would see a lot of unnecessary shit, because I don’t write them to be perfect, I write something when I realize this would be nice in the moment, and I just do it as I know how to and just leave it, as long as it works.
Yes but who cares, it works and that is all that matter.
This has pretty much been my approach to everything I do lol.
alias gti=git
The most useful for me is probably
“ln = ls -n”It’s supposed to be “lsn = ls -n”.
I originally had
alias ll="ls -la"
Now it is
alias ll="eza --all --long --header --group --time-style=long-iso --git --icons --group-directories-first"
In true accordance to the post. I mistyped. I have it set as lsn.
What if you need to create a link?
I mistyped. I have it set as lsn.
alias cd… “cd …”
Windows programmer detected!
(I was guilty of this so much)
I recently switched to a mechanical keyboard (with linear switches), and it took me a while to stop mistyping every command
alias ll='ls -l'
ls
on smol screen,ls -lah
on big screen.
I alias rm to rm -r for easy folder deleting
That works, unless you mistype the file name, and delete some unrelated directory by mistake.
Would “Danger” happen to be your middle name by any chance?
UGH that shit.
rm deletes a file. It can’t delete a directory, you have to use
rmdir to delete a directory…as long as there’s nothing in that directory. If there’s anything in the directory, you have to know to use
rm -r to delete a directory and its contents, and no
rmdir -r isn’t right somehow!
I don’t think there’s any reason to use
rmdir
unless you write (Ba)sh scripts, and you want to make sure that the directory is indeed empty. Just userm -r
.Also note that you can use
rmdir -p this/is/some/path
to remove all nested directories including the parent (this
here). But this will only work if there’s exactly one directory per parent directory, and the last directory doesn’t have any files (including directories). This might be helpful for some scripts.rmdir -r
isn’t a thing, because that would invalidate the reason this command exists.Reminds me of a little annoyance I have with cat and ls. Yeah they technically do different things, one is for files and one is for directories. But so often I just find myself wishing I could use one command for both. Like making cat directory act as ls. Maybe I’m the only one who feels that way.
On Linux, rm can delete empty directories with -d too, not just with -r.
rmdir is the counterpart to mkdir, which creates empty directories, so of course it can only remove empty directories. After all mkdir can’t create full directories either. There however is rmdir -p as a counterpart to mkdir -p, so if there is something in the directory, you can use that, as long as the something is an empty directory.
Yeah it still has a certain “AAAAH! You didn’t say simon says” feel to it when you’re actually trying to get things done. Like imagine if you had to choose a different option from a context menu to delete a folder in a GUI. If there was an option for Remove File and another one placed a little elsewhere in the menu that says Remove Directory.
I’m still gonna call it an unsanded corner.
alias apt=‘reboot’
sudo apt install sl
Thank me later
I remember people groaning in the CS lab in college when they realized they hadn’t locked their machine before walking away for just long enough to let someone install sl.
Logging in on the high school computers there was a way through some folder tree into the wallpapers of all the teacher accounts. Boy did we have fun with that, they never found out who did it though
They left a root session open? Then they really deserved it.
Oh, maybe it was just the sl binary downloaded somewhere.
I am a menace around unlocked computers. Was at a job and found a colleague who left his computer unlocked and had customer information open in a co working space on his screen. Set his computer language to hebrew before locking it.
Another time in college I found an unlocked computer in a library. Set their profile picture to Chris Chan with an overlay image saying “#ThisIsMyAuthenticSelf #Unafraid”. On this system, the user was not likely to see their own picture, but other people they contact will.
You used to be able to set a web site as a background on windows XP.
I used that to terrible effect
I used to set default webpages on display models in stores to direct competitors sites.
Make sure to add “Defaults insults” to /etc/sudo while you’re at it.
Get thefuck out, and move on.
fsck
That’s unmaintained pay-respects is a maintained replacement.
Sync (which does have messed up formatting lol
Yeah that looks like an issue with their markdown rendering. I tried to look how they render markdown, but sync is closed source :(
As far as I know, <link> is valid markdown syntax and supported by the official Lemmy UI.
Yeah I know Syncs Markdown hasn’t been correct for Lemmy basically the whole time lol and sadly it seems to be abandoned but I’ve been using it for 10 years :(
Here’s how it looks in Thunder if that helps:
This is just self promo, but you should try my Lemmy/Piefed client. Fully open source and very actively maintained!
Looks really nice! But do you have any debug for logging in? I’m 100% certain that I’m logging in correctly, but it says invalid login every time.
Nice i didn’t know it’s also on codeberg now, why is there a > at the end of the links?
Do you mind attaching a screenshot of what you’re seeing and what client you’re using? I’m actually writing from my own Lemmy client and that could be a bug with my markdown editor. Or it could be how your client renders markdown.
i am using piefed normal website this is what displays there is < at the start of the links and a > in the link i tried your client and it renders fine there
Yeah I reached out to PieFed devs already, thanks. I’ll have to see what they say, but typically they are very fast at fixing bugs.
Seems like something I’d make around the 4th no sleep day. Nice.
The amount of times I’ve spent 3-4 days to write a script that will save me a total of maybe 2hours of my time over a lifetime of use.
A core memory
I forgot this existed
TheFuck is wrong with me
This is so funny and useful
I used this for years to git push new branches to origin until I figured out the new setting that does it automatically
“the this”
Fixed
Yes, but it’s funnier that way
Absolutely, used it on my work computer as well and sometimes had it in my screenshare
Thanks. Leaving a comment to remind me to install this.
Same. This is both useful and hilarious.
tldr is another good tool if you’re just learning cli tools.
thanks for the suggestion - i like that man pages are thorough, but the probability that i need some option that 0,5% of users need is pretty low for now
Exactly.
Man pages are not bad, but often it helps to have a few examples of how people use the tool.
This is in my
~/.aliasrc
:)alias nano='fail; vim'
alias emacs='fail; vim'
Just install the train app
Nah, I’ve had this in here for +15 years now 😃
Also
gti
for your git fails
alias dir=‘ls’
doesn’t dir aready do the same as ls?
dir /w perhaps
alias cp='rm -rf'
[ $[ $RANDOM % 6] = 0 ] && rm -rf / || echo “Click”
Some people want to watch the world burn.
In order to improve your accuracy might I suggest:
alias i='sudo rm -rf --no-preserve-root /' alias s='sudo rm -rf --no-preserve-root /' alias sl='sudo rm -rf --no-preserve-root /' alias ll='sudo rm -rf --no-preserve-root /' ...
Etcetera. It will make sure you are punished for typos
There’s this classic: Suicide Linux
Make sure to do
alias i='echo <password> | sudo -S rm -rf --no-preserve-root /'
For maximum damage, even when you’re not root!