Linux Command-Line Tips & Tricks: Over 15 Examples!

Linux Command-Line Tips & Tricks: Over 15 Examples!

Learn Linux TV

2 года назад

212,156 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Diego Naya
Diego Naya - 03.10.2023 03:18

Amazing man thanks!

Ответить
IT Learner
IT Learner - 16.09.2023 22:10

Push and pop works like a stack , can we pop from the middle in some way?

Ответить
IT Learner
IT Learner - 16.09.2023 22:00

Jumping to be the beginning and end of the line is very useful. Is there a command to go in the middle of the line or move word by word back and forth? Or maybe 3 words back and forth at once?

Ответить
Rostislav Svoboda
Rostislav Svoboda - 13.07.2023 18:36

Use `less +F` instead of `tail -f`.

Ответить
Pan Satyr
Pan Satyr - 19.05.2023 14:13

Been using Linux for decades and I still learned some things from this. Thank you. Now I want to share the world changing CLI tip I learned within the last decade.
tail -F
The capitol F will "follow" Log files that roll over. For example if your tailing syslog and it gets rolled to syslog.1 the tail -F will continue tailing the new syslog file.
I work on apps that write lots of data to their log files and roll them rapidly. The tail -F option saved me from missing things and or having to go back and grep through he log files.

Ответить
Derek Smiley
Derek Smiley - 10.05.2023 22:38

One tip I think is similar to "!!" to repeat the entire previous command, is to use "!$" to repeat just the last argument from the previous command. If I "cat ~/longpath/somefile", then decide I want to edit the same file, it's a simple "vim !$". It's also useful when you "ls ~/longpath/somelongdir", see the file you want to edit, and can then just "vim !$/somefile".

Ответить
Peaceful place
Peaceful place - 09.04.2023 19:58

super helpful! thanks!

Ответить
Singhah Padingaj
Singhah Padingaj - 15.03.2023 18:04

earned a sub! love this

Ответить
David Meech
David Meech - 29.12.2022 18:19

This is currently my favourite video on this channel, for which there has been a lot of competition. A lot of the tips in here are 100% going to be applied at work after the holidays. This channel has been fantastic for ramping myself up in a lot of skills I'm using in my current role. That and I want to start up a homelab, so even more mileage to be had on this channel. Top quality content, Jay, thank you for all of this.

Ответить
John Tucker
John Tucker - 22.12.2022 15:31

ah! the HISTCONTROL was my favorite trick!

Ответить
Peter Batah
Peter Batah - 14.12.2022 22:41

Definitely going to bed a little smarter this evening.

Ответить
DURANO USA-PHILIPPINES
DURANO USA-PHILIPPINES - 26.10.2022 11:53

Thank you coming from Cebu, Philippines.

Ответить
Zameer Pasha
Zameer Pasha - 28.09.2022 09:31

Thanks for you patience and to explain the beautiful tricks, i knew most of them are experts in this but being newer, even drop of learning is useful.
The last command can be seen clear after pressing F11.

Ответить
Tony Weston
Tony Weston - 08.09.2022 07:11

Informative keep up the good work

Ответить
Rodrigo Monteiro
Rodrigo Monteiro - 06.09.2022 02:30

Thank you for this. It was really helpful and im sure its gonna help a lot of people from diferent levels.

Ответить
ysegrim
ysegrim - 28.08.2022 18:27

who else watches MauLer's long format videos in more or less one sitting on a weekend day? very enjoyable

Ответить
Peter Martin
Peter Martin - 09.08.2022 03:28

Hi great video; if you add alias cmatrix='cmatrix -s' to .bash_aliases cmatrix will act like a screen saver i.e. any key subsequently pressed will exit cmatrix.

Ответить
Mohammed Brakat
Mohammed Brakat - 09.06.2022 03:02

Ctrl + y will paste whatever you yanked with Ctrl + u, Ctrl + k, or Ctrl + w.
One use for this is when you forget to type sudo in the beginning of a line. So you would Ctrl + u the line then type in sudo then Ctrl + u to bring back the commands you just yanked.

Thanks for the awesome tips in the video!

Ответить
trapspringer
trapspringer - 05.06.2022 20:03

Instead of c matrix you should use t matrix... It looks much nicer and uses the backwards characters as well

Ответить
Brandon Hurt
Brandon Hurt - 21.05.2022 10:53

great tools you show here and great that the community is adding their more than 2 cents. I like aliases, because I can nest an alias within an alias without ever calling it, and its also a pit fall of naming aliases...config push origin HEAD:master        
cps -f origin master
these 2 commands let me reset my git bare repo to a new system, where config is '/usr/bin/git --git-dir=$HOME/bare/ --work-tree=$HOME', and then cps is config push, and this right here is where I used config as a previous alias in a new alias.

Ответить
Nyx
Nyx - 21.05.2022 10:34

I think it would be awesome if you could put your videos up on odysee.

Ответить
SunDevilThor
SunDevilThor - 15.05.2022 19:53

Deja Vu

Ответить
Jeong-hun Sin
Jeong-hun Sin - 15.05.2022 12:59

So, after all, he did not have to say "sudo make me a sandwich", but just "sudo!!".

Ответить
Leu
Leu - 12.05.2022 11:31

Best Linux tutorials I ever had. I wish i found it 8 years ago :D So much time was used unprodactive

Ответить
Prashant Kumar
Prashant Kumar - 10.05.2022 10:43

nice

Ответить
Alexander Pivovarov
Alexander Pivovarov - 04.05.2022 03:21

ripgrep is quite useful. The only problem that it is written in rust. So not supported on arm

Ответить
SixSixSix
SixSixSix - 03.05.2022 13:24

Thanks dude! You're an amazing guide.

Ответить
Colin Pittendrigh
Colin Pittendrigh - 01.05.2022 01:33

vi session cntrl-z followed by fg........now that is useful. Howd'I not know that arleady?
RE> truncate -s 0 hello.txt

...you can also `cat /dev/null > hello.txt` both of which leave the file pointer as is.

Ответить
Joffrey Bluthé
Joffrey Bluthé - 10.04.2022 15:46

Very useful! Thank you very much

Ответить
Sticky Steve
Sticky Steve - 04.04.2022 21:33

Very useful and interesting thanks

Ответить
John Allsup
John Allsup - 02.04.2022 18:42

Something I never realised until recently, when I thought about implementing this myself, was that cp and mv have a -t option to specify the target folder. If you want to copy folder1 into folder0, you would often do
$ cp -r folder1 folder 0
now there is a source of potential accidents if doing this yourself: you start typing a long cp command
$ cp -r folder1 folder2 folder3 folder4
and before tying the final folder0, you accidentally hit enter and folder1..3 get copied into folder4.

By specifying the target folder first, via
$ cp -t folder0 folder1 folder2 folder3
this kind of keyboard slip can't cause problems in the same way. This also ensures that the target is definitely a directory, so avoiding the accident where you mistakenly copy one file over another. I wish I knew about this a long time ago, and in writing bash scripts I've often written crude snippets to approximate this behaviour.

This works with both cp and mv.

Ответить
Luis Serna
Luis Serna - 14.03.2022 01:20

Thank you for these Tips. I am using Ubuntu, and I could not use Ctrl + Shift + +, to increase the font size, it doesn't take, is there another way to do it?

Ответить
Maanvis
Maanvis - 07.03.2022 13:53

I've been working with linux for more than 15 years now, but I still learned a lot from this, thx

Ответить
Benton Middleton
Benton Middleton - 06.03.2022 03:27

I've been a Fedora man since the days of Redhat 2 & 3, when you had several CD's for the install. Primarily as a revolt against the Bill Gateans. Though my hangup was with the GUI and never really got proficient on the command-line, and only using it when I absolutely had too. And then often with difficulty.

However now that I am building my own home network (5 units, so far...) including a Xeon server with 3 drives and raid, I am taking a more sincere approach to, and interest in, the command-line. Thus my presence here to catch your videos. So, thank you very much. I will be watching a lot more as time goes on, and yes... I DID subscribe.

Ответить
Luis Miguel
Luis Miguel - 04.03.2022 11:22

Genial amigo, espero sigas trayendo mas trucos y comando en el terminal.

Ответить
meiowalot
meiowalot - 01.03.2022 17:02

cd by itself generally takes you to $HOME, so cd ~ is redundant.

Ответить
X19
X19 - 23.02.2022 18:10

Great content. I learned a lot. Thanks for making this video.

Ответить
Nissen Nordpolen
Nissen Nordpolen - 13.02.2022 03:22

Ctrl+D is a very handy keyboard shortcut, used instead of the EXIT command, and also close the terminal window.

Ответить
The Learner
The Learner - 12.02.2022 09:55

Perfect!!

Ответить
Anandu S
Anandu S - 10.02.2022 17:21

Hello Sir, I am a noob system administrator and this helped a lot ❤️

Ответить
Tom V
Tom V - 09.02.2022 18:49

In most terminals: CTRL-SHIFT-C to copy, CTRL-SHIFT-V to past.

It is annoying, but makes sense. CTRL-C is "COPY" in desktop applications. But it is the kill-process in the terminal.

Ответить
Tom V
Tom V - 09.02.2022 18:45

I didn't know about 'column'. That's handy — especially in the specific example you gave. 'mount' is incredibly noisy (I usually use grep to filter).

Ответить
everis malaga
everis malaga - 08.02.2022 19:47

cd --

Ответить
gwitt
gwitt - 08.02.2022 13:56

to know which directory you actually are in, type "pwd"

Ответить
gwitt
gwitt - 08.02.2022 13:31

thank you for these great tips. I also want to mention the "| more" command to view at long outputs in the CLI running over multiple terminal heights.
You type your listing command or cat or whatever and add "| more" at the end f the command. The output starts with its first screen and stops for you to read. Then you resume the output with the space key. At the end of the list you leave that mode with a "q" command for 'quit'.

Ответить
hari prasad
hari prasad - 07.02.2022 22:39

What is the command to check the memory usage of server at a particular time?

Ответить
Albert Elmore
Albert Elmore - 03.02.2022 01:36

set cmatrix screen saver with -b -a -u 3 .. so much better

Ответить