Sunday, 21 October 2012
Enable Auto Correction Of Path In Bash
While using the cd command, its normal to make mistakes while typing the directory path. You can enable auto-correction while typing directory path by enabling a particular shell option.
Minor spelling mistakes will be corrected automatically if the particular shell option cdspell using the SHell OPTions command invoked with shopt command.
When you enable the cdspell shell option, the errors checked for are missing characters, repeated characters, and transposed characters. Once the error is encountered, the corrected path is printed and directory is changed successfully.
The line shopt -s cdspell enables the auto-correction while using cd command. The session above shows some of the corrections performed once we enabled the cdspell shell option.
If you want to turn on this particular setting, then add the appropriate line using the command below:
I hope this counts as useful tips to beginner linux guys ;)
Read more...
Minor spelling mistakes will be corrected automatically if the particular shell option cdspell using the SHell OPTions command invoked with shopt command.
When you enable the cdspell shell option, the errors checked for are missing characters, repeated characters, and transposed characters. Once the error is encountered, the corrected path is printed and directory is changed successfully.
samar@samar-Techgaun:~$ shopt -s cdspell
samar@samar-Techgaun:~$ cd Desktp
Desktop
samar@samar-Techgaun:~/Desktop$ cd ../Deskotp/
../Desktop/
samar@samar-Techgaun:~/Desktop$ cd ../Desktoop
../Desktop
samar@samar-Techgaun:~/Desktop$
samar@samar-Techgaun:~$ cd Desktp
Desktop
samar@samar-Techgaun:~/Desktop$ cd ../Deskotp/
../Desktop/
samar@samar-Techgaun:~/Desktop$ cd ../Desktoop
../Desktop
samar@samar-Techgaun:~/Desktop$
The line shopt -s cdspell enables the auto-correction while using cd command. The session above shows some of the corrections performed once we enabled the cdspell shell option.
If you want to turn on this particular setting, then add the appropriate line using the command below:
samar@samar-Techgaun:~$ echo "shopt -s cdspell" >> ~/.bash_profile
I hope this counts as useful tips to beginner linux guys ;)
Read more...
Enable Auto Correction Of Path In Bash
2012-10-21T17:05:00+05:45
Cool Samar
bash|command line|tricks and tips|ubuntu|
Comments
Labels:
bash,
command line,
tricks and tips,
ubuntu
Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget |
Saturday, 20 October 2012
Ubuntu Tweak Will No Longer Be Developed
Comes as a very sad news but Ubuntu Tweak developer has decided to stop the development of Ubuntu Tweak.
Tualatrix Chou writes in a blog post:
" I want to stop the development and maintenance of Ubuntu Tweak. This means you will not be able to use “Apps” (Since it is a web service), I will not response for the bug report, the last commit of the code will be: Add cache support for Apps, only available in Ubuntu 12.10, so sad".
While the developer writes the reason as If making free software is not free any more, why still doing this?, I found the whole post quite cryptic.
One of his friend mentions that Ubuntu Tweak, though being a great app has not been included in the official source which is a really depressing thing.
Read more...
" I want to stop the development and maintenance of Ubuntu Tweak. This means you will not be able to use “Apps” (Since it is a web service), I will not response for the bug report, the last commit of the code will be: Add cache support for Apps, only available in Ubuntu 12.10, so sad".
While the developer writes the reason as If making free software is not free any more, why still doing this?, I found the whole post quite cryptic.
One of his friend mentions that Ubuntu Tweak, though being a great app has not been included in the official source which is a really depressing thing.
Read more...
Ubuntu Tweak Will No Longer Be Developed
2012-10-20T10:39:00+05:45
Cool Samar
ubuntu|ubuntu tweak|
Comments
Labels:
ubuntu,
ubuntu tweak
Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget |
Tuesday, 16 October 2012
Practical ls Command Examples For Fun & Profit
The power of linux lies in the shell through which we can perform complex job in no time. While the directory listing command 'ls' seems to be very simple command, the linux shell provides the power to use switches and pipes to do anything from terminal. Check out this list with practically useful examples using ls.
Any more example that fires up in your mind? Feel free to share over here ;)
Read more...
Display all files including hidden files/folders
ls -a
Display one file/folder per line
ls -1
Count number of files & folders
ls -1 | wc -l
Human readable file sizes (eg. Mb or Gb)
ls -lh
Alphabetically sort the listing
ls -X
Only list the folders in current directory
ls -d */
ls -p | grep /
ls -p | grep /
Display folders in current directory consisting certain patterns
ls -l D* | grep :$
ls -l *a* | grep :$
ls -l *a* | grep :$
List files by descending order of modification time
ls -lt
ls -l --sort=time #alternative long version
ls -l --sort=time #alternative long version
List files by descending order of creation time
ls -lct
List files in reverse order
ls -ltr
ls -l --sort=time --reverse #alternative long version
ls -l --sort=time --reverse #alternative long version
List files in descending order of file size
ls -lSh
ls -lh --sort=size
ls -lSh1 *.avi #find largest AVI file
rm `ls -S1 | head -1` #delete largest file in current folder
ls -lh --sort=size
ls -lSh1 *.avi #find largest AVI file
rm `ls -S1 | head -1` #delete largest file in current folder
List files in ascending order of file size
ls -lShr
ls -lh --sort=size --reverse #alternative long version
ls -lh --sort=size --reverse #alternative long version
Display directories in recursive manner
ls -R
Display the files/folders created today
ls -l --time-style=+%F | grep `date +%F`
Display the files/folders created this year
ls -l --time-style=+%y | grep `date +%y`
Any more example that fires up in your mind? Feel free to share over here ;)
Read more...
Practical ls Command Examples For Fun & Profit
2012-10-16T00:44:00+05:45
Cool Samar
command line|edubuntu|fedora|linux|ubuntu|ubuntu 12.04|ubuntu 12.10|
Comments
Labels:
command line,
edubuntu,
fedora,
linux,
ubuntu,
ubuntu 12.04,
ubuntu 12.10
Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget |
Monday, 15 October 2012
Useful Nautilus Shortcuts
Nautilus is a default file manager for GNOME Desktop and is used as the default file manager in several linux distros such as Ubuntu. I love nautilus because its simple, friendly, and clean, supports local as well as remote file systems over different protocols. Moreover, there are several useful shortcuts that make life easier while using nautilus.
Below is the list of the most helpful shortcuts for navigation and file management in the nautilus:
Ctrl + r: Refresh the current view
Ctrl + h: Toggle show/hide mode for hidden files
F9: Show/Hide the side pane
Ctrl + l: Activate location/url bar (You can then provide path to local or remote filesystems or quickly copy the absolute paths)
Alt + Up Arrow: Move up one directory level
Alt + Down Arrow: Move down one directory level (the directory to be entered should be selected for this to work)
Alt + Left Arrow: Go back to the previous folder in view
Alt + Right Arrow: Go forward
Ctrl + Shift + n: Create a new empty directory
Ctrl + (+ / -): Zoom in (+) or zoom out (-)
Ctrl + 0: Zoom to normal state
Alt + Enter: View selected file/folder properties
F2: Rename selected file/folder
Ctrl + Shift + Drag file/folder: Create symbolic link to file/folder
Ctrl + f: Search for files/folders
Ctrl + s: Select files based upon templates (eg. select all pdf files using *.pdf)
Ctrl + 1: Toggle view as icons
Ctrl + 2: Toggle view as lists
Ctrl + 3: Toggle compact view
Ctrl + w: Close current nautilus window
Ctrl + Shift + w: Current all open nautilus windows
Ctrl + T: Open new tab
Alt + HOME: Navigate to HOME folder
F6: Toggle between side pane and central pane
Know more shortcuts? Share as the comments :)
Read more...
Below is the list of the most helpful shortcuts for navigation and file management in the nautilus:
Ctrl + r: Refresh the current view
Ctrl + h: Toggle show/hide mode for hidden files
F9: Show/Hide the side pane
Ctrl + l: Activate location/url bar (You can then provide path to local or remote filesystems or quickly copy the absolute paths)
Alt + Up Arrow: Move up one directory level
Alt + Down Arrow: Move down one directory level (the directory to be entered should be selected for this to work)
Alt + Left Arrow: Go back to the previous folder in view
Alt + Right Arrow: Go forward
Ctrl + Shift + n: Create a new empty directory
Ctrl + (+ / -): Zoom in (+) or zoom out (-)
Ctrl + 0: Zoom to normal state
Alt + Enter: View selected file/folder properties
F2: Rename selected file/folder
Ctrl + Shift + Drag file/folder: Create symbolic link to file/folder
Ctrl + f: Search for files/folders
Ctrl + s: Select files based upon templates (eg. select all pdf files using *.pdf)
Ctrl + 1: Toggle view as icons
Ctrl + 2: Toggle view as lists
Ctrl + 3: Toggle compact view
Ctrl + w: Close current nautilus window
Ctrl + Shift + w: Current all open nautilus windows
Ctrl + T: Open new tab
Alt + HOME: Navigate to HOME folder
F6: Toggle between side pane and central pane
Know more shortcuts? Share as the comments :)
Read more...
Useful Nautilus Shortcuts
2012-10-15T17:51:00+05:45
Cool Samar
keyboard shortcuts|linux|nautilus|tricks and tips|ubuntu|
Comments
Labels:
keyboard shortcuts,
linux,
nautilus,
tricks and tips,
ubuntu
Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget |
Saturday, 13 October 2012
How To Exclude Directory While Compressing With Tar
Quite a handy and useful tip here. Several times, you want to compress files and folders but there might be cases when you want to compress your data excluding some of the directories. Tar command makes the process easier by providing us a exclusion switch.
I was actually backing up data I had downloaded in the remote server and wanted a copy of backup tar file in my system as well. But all those images that resided in the folders deep inside were not necessary for me. So all I did was something like below:
The above command effectively excludes all the sub directories from testdirectory having the string image (eg. image, images, images_old in my case) and creates the backup.tar file. Moreover, the --exclude switch also co-operates the regular expressions so you can specify the regex to filter the directories. As an example, the command below excludes the directories a, b, c, d, and e while creating the tarball.
You can exploit this switch for ease several times in your daily works. I hope this helps :)
Read more...
I was actually backing up data I had downloaded in the remote server and wanted a copy of backup tar file in my system as well. But all those images that resided in the folders deep inside were not necessary for me. So all I did was something like below:
adm@RServ:~$ tar cvf backup.tar test --exclude=image*
The above command effectively excludes all the sub directories from testdirectory having the string image (eg. image, images, images_old in my case) and creates the backup.tar file. Moreover, the --exclude switch also co-operates the regular expressions so you can specify the regex to filter the directories. As an example, the command below excludes the directories a, b, c, d, and e while creating the tarball.
adm@RServ:~$ tar cvf backup.tar test --exclude=[a-e]
You can exploit this switch for ease several times in your daily works. I hope this helps :)
Read more...
How To Exclude Directory While Compressing With Tar
2012-10-13T19:32:00+05:45
Cool Samar
command line|linux|tricks and tips|
Comments
Labels:
command line,
linux,
tricks and tips
Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget |
Empty Trash From Command Line In Ubuntu
CLI is such a sexy piece so why bother using GUI, even for cleaning up your trash. In this post, you will see how you can empty trash in Ubuntu from command line.
The trash you see in GUI is nothing but just the view for the files deleted by users which are temporarily moved to the special location of user's home directory. For any user, the trash location is ~/.local/share/Trash/. That is, whatever a user deletes gets saved in this location.
I hope this becomes useful :)
Read more...
The trash you see in GUI is nothing but just the view for the files deleted by users which are temporarily moved to the special location of user's home directory. For any user, the trash location is ~/.local/share/Trash/. That is, whatever a user deletes gets saved in this location.
samar@samar-Techgaun:~$ rm -rf ~/.local/share/Trash/
I hope this becomes useful :)
Read more...
Empty Trash From Command Line In Ubuntu
2012-10-13T16:11:00+05:45
Cool Samar
command line|tricks and tips|ubuntu|ubuntu 11.10|ubuntu 12.04|ubuntu 12.10|
Comments
Labels:
command line,
tricks and tips,
ubuntu,
ubuntu 11.10,
ubuntu 12.04,
ubuntu 12.10
Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget |
Enable Fingerprint Authentication In Ubuntu
So you got fingerprint reader in your device but have not been able to use it under ubuntu? Follow this How To to enable fingerprint authentication in ubuntu using the Fingerprint GUI from fingerprints reader integration team.
First make sure your fingerprint hardware is supported. You can check for the vendor and device ID by entering the following command:
This link provides the list of the supported fingerprint readers.
Installation is easy. Fire up the terminal and enter the following commands:
You will have to restart the system or log out the session and login back to use and configure the fingerprint GUI.
Press Alt + F2 and type fingerprint-gui. From this GUI, you can configure and enroll your fingerprints.
Read more...
First make sure your fingerprint hardware is supported. You can check for the vendor and device ID by entering the following command:
samar@TG:~$ lsusb | grep -i finger | awk -F " " '{print $6}'
138a:0005
138a:0005
Installation is easy. Fire up the terminal and enter the following commands:
sudo add-apt-repository ppa:fingerprint/fingerprint-gui
sudo apt-get update
sudo apt-get install libbsapi policykit-1-fingerprint-gui fingerprint-gui
sudo apt-get update
sudo apt-get install libbsapi policykit-1-fingerprint-gui fingerprint-gui
You will have to restart the system or log out the session and login back to use and configure the fingerprint GUI.
Press Alt + F2 and type fingerprint-gui. From this GUI, you can configure and enroll your fingerprints.
Read more...
Enable Fingerprint Authentication In Ubuntu
2012-10-13T10:11:00+05:45
Cool Samar
fingerprint|ubuntu|ubuntu 11.10|ubuntu 12.10|
Comments
Labels:
fingerprint,
ubuntu,
ubuntu 11.10,
ubuntu 12.10
Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget |
Add Google Search Support In Gnome-Terminal
Gnome-terminal is my favorite thing in my system and recently I came to know that I could add google search support in gnome-terminal which is totally awesome. Ubuntu Tweak already includes the google search support but if you want google search in your terminal without the whole ubuntu tweak, you can follow this guide.
All you need to do is add the PPA and you can easily install the gnome-terminal with google search support. Fire up the terminal and enter the following commands:
Credits: Ubuntu Tweak
Read more...
All you need to do is add the PPA and you can easily install the gnome-terminal with google search support. Fire up the terminal and enter the following commands:
sudo add-apt-repository ppa:tualatrix/personal
sudo apt-get update
sudo apt-get install gnome-terminal
sudo apt-get update
sudo apt-get install gnome-terminal
Credits: Ubuntu Tweak
Read more...
Add Google Search Support In Gnome-Terminal
2012-10-13T09:22:00+05:45
Cool Samar
command line|tricks and tips|ubuntu|
Comments
Labels:
command line,
tricks and tips,
ubuntu
Bookmark this post:blogger tutorials
Social Bookmarking Blogger Widget |
Subscribe to:
Posts (Atom)