this post was submitted on 28 Jun 2023
31 points (94.3% liked)
Linux
48216 readers
893 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Only when needed. And I don't really use aliases at all for basic things like that. I don't like things like cp or mv being verbose most of the time as I don't have much use for their output and like it when commands are quite unless there is a problem as it makes it easier to see the error lines. I don't really want to be confirming every file in a recursive rm or cp or mv either - just leads to hitting y automatically and not thinking about it. I do like how zsh warns you about
rm *
though with the directory you are about to remove though.That's fair.
Ah but
rm
will only make you confirm if there are more than 3 files to be removed. Andcp
andmv
only if there's risk of overwriting. And it's only one confirm per command, not per file.You must have a different version of rm then I do:
Never really had an issue with cp or mv overwriting files where I didnt mean to. Possibly because I don't default recursive on all the time. So they tend to error when accidentality copying folders. And I tend to tab complete paths to see what is in them. I also tend to use rsync for copying large directories rather than just cp when the directories might not be empty to start with.
This should work: