- Posts: 181
- Thank you received: 0
Linux Mini Tips&tricks
19 years 1 month ago #10428
by ping
The greatest pleasure in life is doing what people say you can not do..!!
Linux Mini Tips&tricks was created by ping
Here are some commands that I use and thought might be interesting:
You can view the directories in color:
[code:1]alias ls="ls --color=tty"[/code:1]
If you use "cd" it will take us to the $HOME directory and to go back to the previous directory you have type "cd -"
How to split files so that you can put them on floppy discs
[code:1]split -b 1400000[/code:1]
to make the file back together
[code:1]cat x* > original_filename[/code:1]
You can open another terminal by typing "screen" and you can detach from it by pressing CTRL+A+D
You can run a process in the background by using "&" at the end of the command
If you want to run a previously used command you can type "!" and a part of the beginning of the command
eg: for
[code:1]vi /home/user/README[/code:1]
you can type
[code:1]!vi[/code:1]
Do you want to monitor a log or a file that continuously grows?
[code:1]tail -f file_name[/code:1]
and you wont have to open/close it every time when you want to see what has been added to the file
To give a message to the people that are connected to your computer
[code:1]wall message[/code:1]
Are you annoied by the messages? Stop them
[code:1]mesg n[/code:1]
Do you want to edit a file that you know the name but you don't know where it's located?
[code:1]emacs $(which file_name)[/code:1]
This is all I can think of right now, feel free to continue the list
~Pranav
You can view the directories in color:
[code:1]alias ls="ls --color=tty"[/code:1]
If you use "cd" it will take us to the $HOME directory and to go back to the previous directory you have type "cd -"
How to split files so that you can put them on floppy discs
[code:1]split -b 1400000[/code:1]
to make the file back together
[code:1]cat x* > original_filename[/code:1]
You can open another terminal by typing "screen" and you can detach from it by pressing CTRL+A+D
You can run a process in the background by using "&" at the end of the command
If you want to run a previously used command you can type "!" and a part of the beginning of the command
eg: for
[code:1]vi /home/user/README[/code:1]
you can type
[code:1]!vi[/code:1]
Do you want to monitor a log or a file that continuously grows?
[code:1]tail -f file_name[/code:1]
and you wont have to open/close it every time when you want to see what has been added to the file
To give a message to the people that are connected to your computer
[code:1]wall message[/code:1]
Are you annoied by the messages? Stop them
[code:1]mesg n[/code:1]
Do you want to edit a file that you know the name but you don't know where it's located?
[code:1]emacs $(which file_name)[/code:1]
This is all I can think of right now, feel free to continue the list
~Pranav
The greatest pleasure in life is doing what people say you can not do..!!
19 years 1 month ago #10441
by jhun
Replied by jhun on topic Re: Linux Mini Tips&tricks
nice post there ping..this would really help alot both for noobs and expert linux users...
18 years 11 months ago #12114
by gainil
Replied by gainil on topic Re: Linux Mini Tips&tricks
Hi Ping !!
Nice Post really, as Jhun said it would really help experts as well as newbies like me :lol:
Nice Post really, as Jhun said it would really help experts as well as newbies like me :lol:
- Unforgiven
- Offline
- New Member
Less
More
- Posts: 15
- Thank you received: 0
18 years 11 months ago #12331
by Unforgiven
If there's one thing I hate, it's everything.
Replied by Unforgiven on topic Re: Linux Mini Tips&tricks
To extend his bit on "screen", not only can you detach and reattach to screen sessions, you can also do things like lock the terminal (ctrl-a ctrl-x), and have multiple terminals in one screen session (ctrl-a ctrl-c to create new ones). Screen is really sweet stuff, especially for when you're ssh'ing to a remote box.
Also, here's some configs I picked up from a mailing list a while back that puts a nice clock and listing of active screen terminals at the bottom. Pretty colors, too
It'll also make F7 and F8 be "back and forth" buttons for going through terminals.
Just put it in your .screenrc file in your home directory.
[code:1]hardstatus alwayslastline "%{km}%H%{mk} %{yb}%-Lw%{= yb}%50>%n%f* %t%{-}%+Lw%< %{gk}%-19=%C%a %D,%d %M "
bindkey -k k7 prev
bindkey -k k8 next
startup_message off
[/code:1]
Oh, and you forgot the most important linux command ever!
[code:1]telnet nethack.alt.org
[/code:1]
Also, here's some configs I picked up from a mailing list a while back that puts a nice clock and listing of active screen terminals at the bottom. Pretty colors, too
It'll also make F7 and F8 be "back and forth" buttons for going through terminals.
Just put it in your .screenrc file in your home directory.
[code:1]hardstatus alwayslastline "%{km}%H%{mk} %{yb}%-Lw%{= yb}%50>%n%f* %t%{-}%+Lw%< %{gk}%-19=%C%a %D,%d %M "
bindkey -k k7 prev
bindkey -k k8 next
startup_message off
[/code:1]
Oh, and you forgot the most important linux command ever!
[code:1]telnet nethack.alt.org
[/code:1]
If there's one thing I hate, it's everything.
Time to create page: 0.122 seconds