Open utterances-bot opened 3 years ago
Very cool!
Very good!
If you want to cat bunch of files at once you can this command.
"cat" is short for "concatenate" and literally exists to do what this one liner is supposed to do ;)
You never need to cat a single file because you can just use redirection instead.
In order to real time terminal session, I use the following:
screen -S the-screen-name
: To create a meeting room.
screen -x the-screen-name
: To join a meeting room.
The screen command is available by default on most Linux based system.
I have used this for providing training sessions.
You can also force someone into a screen
session as soon as they login and monitor what they are doing. This can be handy when you give someone access to your server and you don't want them snooping around.
I use this command to copy stdin
to the clipboard: xclip -i -selection clipboard
Then I add a bash alias for it: alias copy='xclip -i -selection clipboard'
So now I can type cat file.txt | copy
and I have copied the file to my clipboard.
If you want to cat bunch of files at once you can this command.
"cat" is short for "concatenate" and literally exists to do what this one liner is supposed to do ;)
You never need to cat a single file because you can just use redirection instead.
Got it TIL cat stands for concatenate but thanks for pointing out
In order to real time terminal session, I use the following:
screen -S the-screen-name
: To create a meeting room.
screen -x the-screen-name
: To join a meeting room.The screen command is available by default on most Linux based system.
I have used this for providing training sessions.
You can also force someone into a
screen
session as soon as they login and monitor what they are doing. This can be handy when you give someone access to your server and you don't want them snooping around.
Got it. So i have used screen in the past but mkfifo
was something really new for me and it was something I recently discovered
I use this command to copy
stdin
to the clipboard:xclip -i -selection clipboard
Then I add a bash alias for it:alias copy='xclip -i -selection clipboard'
So now I can type
cat file.txt | copy
and I have copied the file to my clipboard.
I'll definitely check this out
At the command line, you can set the CDPATH
environment variable. It uses the same syntax as the PATH
variable. And it is used when using the cd
command. If the cd
command does not find the folder in the current directory, it will look for it in one of the directories listed in CDPATH
.
Example: CDPATH=:/home/asiby:/home/asiby/Documents
If there is a foo
folder at /home/asiby/Documents/foo/
I can do this:
cd /
cd foo
pwd
The output will be /home/asiby/Documents/foo
The autocompletions that you get when pressing the tab
key will also look in the paths provided by CDPATH
.
My Favorite One Liners | Muhammad
Commandline one liners that makes your workflow more productive
https://muhammadraza.me/2021/Oneliners/