It happens that some Linux terminal commands are hard to recall, and keeping them on your computer or paper as a cheat sheet is a good practice. Th...
For further actions, you may consider blocking this person and/or reporting abuse
Hi.
A had a quick glance at the list I have the following suggestions for you:
It should be
id
.You probably meant
cd ~
.Add
h
to have human readable sizes! (ls -lah
)There's a command I find myself using from time to time:
du --max-depth=1 -h
which lists sizes of files and folders with, you guessed it, max depth of 1. Useful when you want to find out which folder takes most disk space.the
cd
command without any arguments work exactly likecd ~
.TIL. Thanks!
cd -
is also very helpful to go back and forth between two folders.Didn't know that, thanks
I don't understand why people still use
chmod
like that. It's fine if you want to put it in a script, or even in a manual type thing. But for everyday stuff, it's just way easier to do for examplechmod o+rx
.Because 3 octals are easier to understand.
chmod 777
is equal to `ugo+rwxchmod 750
is equal tochmod u+rwx,g+rx,o-rwx
One of them seems much simpler to me…
When you want to set the exact permissions of a file, maybe, but most of the time people just want to do "let me execute this" or don't let others even read this", and you just cannot tell me that the average user finds it easier to just assemble the exact numeric code of the current permissions with that change applied on the fly as they type the command.
Each to their own I suppose.
I don’t think you can quantify that most of the time ppl just want to execute something they do so in a way that adheres to your personal preferences.
Personally, if I want to let others read something, I’ll
chmod 640
or644
for that. For me, three octals are much easier to type and remember than the dozens of characters required to achieve the same result.Also, it’s not a numeric code. It’s a set of 3 octals that assign rwx permissions to owner, group and all. An octal is not a number, it’s a set of three bits 7 = 111, 6 = 110, 5 = 101, etc. The digit just represents the order of bits.
This is just base 2, which is pretty fundamental to computing. It’s really not hard to count from 0 to 7 in binary. My seven year old figured it out in about five minutes, so I’d suggest the average terminal user could do the same. Certainly much quicker than determining the exact collection and combination of letters and symbols required to provide
754
permissions.Perhaps you should do some reading on the topic to shore up the clear gaps in your understanding. :)
I don't see where that condescending conclusion comes from, but I think you're conflating what is a good way of teaching
chmod
and how you and everyone else should be using it.I'm in your exact shoes with colours in hexadecimal; They're easiest to type if you've spent way too much time using them and can just write and interpret them as any other notation, but I would never put it as the default in any tutorial.
Most users of a tool won't be using it often enough to memorise these things, and a more mnemonic notation like g+w to say "add write to group" will be quicker to learn and easier to remember when you need it.
This post was supposed to be a cheat-sheet, after all.
This is awesome! I personally use tldr, because it's easy to access from the terminal. This is a fantastic sheet, though. Also,
ls -al
displays the verbose output for files (date, author, update, etc), whilels
just displays the files.Holy heck, thanks for the lead to tldr; I never knew I needed that in my life until now
nice
Cool. I use each command. Good to know I left the early admin stages.
Very good list.
A command I use almost daily is
grep -rnI "thing I want to find"
to search though a directory recursively butI
gnoring binary files and giving me linen
umbers. I also add--exclude-dir=.svn
because searching through the SVN stuff is pointless.Some of these are problematic, e.g.:
This is correct, but the way you say it makes it look like
cd -
which acts to toggle you between the current and previous directories.You mix
adduser
withuserdel
andusermod
when there's auseradd
command but don't explain why.You should explain what you mean by "forecefully".
This is incorrect.
touch newfile
updates one of the timestamps on a file callednewfile
. If newfile doesn't exist, it is created as a side effect, but that's not what the command does.This finds files and directories with the exact name "searchargument".
ifconfig
is deprecated andip
command should be used instead.Tonton Astro Ria for live episodes of Malay dramas and Malaysian telefilms 2024.
Explore Drama Melayu free online 2023 and enjoy free series online dfm2u hd today.
Tonton Astro Ria
Really important
Oh, nice!
Now I, as professional Linux user, can calmly remove project server
you made my day!
@ Directory navigation:
pushd /var - put current directory on stack and jump to /var
popd - jump back to directory on stack
Awesome share, thanks