Skip to main content

Some useful linux commands

Copy/Paste in Linux :


In linux highlighting text will put it into the clipboard, and pressing your mouse centre button or mouse wheel will paste it.
If you have no centre button or mouse wheel, press left and right buttons at the same time.
Middle button copy/paste works in almost all applications including terminal windows. Some applications such as KDE and OpenOffice also support Windows style CtlC/CtlV Copy/Paste. So for example you could use either CtlC/CtlV or mouse wheel click to transfer data between Kwrite and Open Office. There is a setting in OpenOffice to define the behaviour of mouse wheel click.
[http://www.jennings.homelinux.net/paste.html]

Auto fill in Linux :

The complete command in bash lets you associate file types with certain applications. If after associating a file type to an application you were to write the name of the application and press Tab, only files with associated file types would be displayed.

Even smarter completion
By default, Tab completion is quite dim-witted. This is because when you have already typed cd down before pressing Tab, you'd expect bash to complete only directory names. But bash goes ahead and displays all possible files and directories that begin with 'down.'
You can, however, convert bash into a brilliant command-reading whiz. As root, edit the /etc/bash.bashrc file. Scroll down to the end of the file till you see the section:
# enable bash completion in interactive shells
#if [ -f /etc/bash_completion ]; then
#    . /etc/bash_completion

[http://www.linux.com/archive/articles/54005]


#fi
Uncomment this section and voilĂ , you have given bash powers far beyond your imagination! Not only is bash now smart enough to know when to complete only directory names, it can also complete man pages and even some command arguments.
Don't despair if you don't have root previleges. Just edit the last section of your ~/.bashrc file.

Comments

Popular posts from this blog

Backslash on mac

I had been struggling to type back slash ( \) character on mac japanese keyboard as they don't have it printed on the keyboard, and I was doing copy paste all the time from google when i needed to type it until recently a tip came to my rescue , shortcut to backslash on mac japanese keyboard. Alt + ¥  Hope it helps others. 

How to Enter Split View on MAC

Enter Split  View Hover your pointer over the full-screen button in the upper-left corner of a  window . Or click and hold the button. Choose ”Tile  Window  to Left of Screen” or ”Tile  Window  to Right of Screen” from the menu. ... Then click a  window  on the other side of the screen to begin using both  windows  side by side. Hover your pointer over the full-screen button in the upper-left corner of a  window . Or click and hold the button. Choose ”Tile  Window  to Left of Screen” or ”Tile  Window  to Right of Screen” from the menu. ... Then click a  window  on the other side of the screen to begin using both  windows  side by side.