EFYTimes takes you through some tips if you are a hard core Linux fan...
Tuesday, September 10, 2013: An average Linux user is separable from the super-geeks based on the time and effort spent learning the kinds of hacks, tricks, tips and techniques that turn long jobs into a moment's work. EFYTimes takes you through some tips if you are one of those who loves the Linux OS:
1: Check processes not run by you: In case of an attack, even in an office environment, your best bet is to list all the processes on the box not being run by you!
ps aux | grep -v `whoami`
Or, to be a little more clever, why not just list the top ten time-wasters:
ps aux --sort=-%cpu | grep -m 11 -v `whoami`
2: Replacing same text in multiple files: In case you as a user want to replace in multiple locations you can run this:
perl -i -pe 's/Windows/Linux/;' test*
To replace the text Windows with Linux in all text files in current directory and down you can run this:
find . -name '*.txt' -print | xargs perl -pi -e's/Windows/Linux/ig' *.txt
Or if you prefer this will also work, but only on regular files:
find -type f -name '*.txt' -print0 | xargs --null perl -pi -e 's/Windows/Linux/'
3: Fix a wonky terminal: If you are in the unenviable position of having used less or cat to list a file, and ended up viewing binary instead, Send the terminal an initialisation command:
and all will be well again.
4: Creating Mozilla keywords: A useful feature in Konqueror is the ability to type gg onion to do a Google search based on the word onion. The same kind of functionality can be achieved in Mozilla by first clicking on Bookmarks>Manage Bookmarks and then Add a New Bookmark.
5: Running multiple X sessions: If you share your Linux box with someone and don’t want to be constantly logging in and out, you can just start your computer in a graphical mode (runlevel 5), by simultaneously pressing the keys Control+Alt+F1 - you will get a login prompt. Insert your login and password and then execute:
startx -- :1
to get into your graphical environment. To go back to the previous user session, press Ctrl+Alt+F7, while to get yours back press Ctrl+Alt+F8.
6: Faster browsing: If you want to speed up your web browsing experience, start the KDE Control Center and choose System > KDE performance from the sidebar. You can now select to preload Konqueror instances. Effectively, this means that Konqueror is run on startup, but kept hidden until you try to use it.
7: Backup your website easily: If you want to back up a directory on a computer and only copy changed files to the backup computer instead of everything with each backup, you can use the rsync tool to do this. You will need an account on the remote computer that you are backing up from. Here is the command:
rsync -vare ssh email@example.com:/home/jono/importantfiles/* /home/jono/backup/
8: Keeping your clock in time: This is the best way to synchronise your watch on your computer. You will need to install the ntpdate tool that is often included in the NTP package, and then you can synchronise with an NTP server:
9: Finding the biggest files: A common problem with computers is when you have a number of large files (such as audio/video clips) that you may want to get rid of. You can find the biggest files in the current directory with:
10: Nautilus shortcuts: This has a a few keyboard shortcuts that can have you flying through files:
Open a location - Ctrl+L
Open Parent folder - Ctrl+Up
Arrow keys navigate around current folder.
You can also customise the file icons with 'emblems'.
11: Defrag your databases: Whenever you change the structure of a MySQL database, or remove a lot of data from it, the files can become fragmented resulting in a loss of performance, particularly when running queries. Just remember any time you change the database to run the optimiser:
12: Quicker emails: Don’t waste time in locating email clients. Press Alt+F2 to bring up the 'Run command' dialog. Type:
Press return and KMail will automatically fire up, ready for your words of wisdom. You don't even need to fill in the entire email address. This also works for Internet addresses: try typing www.slashdot.org to launch Konqueror.
13: Save battery power: You are probably familiar with using hdparm for tuning a hard drive, but it can also save battery life on your laptop, or make life quieter for you by spinning down drives.
hdparm -y /dev/hdb
hdparm -Y /dev/hdb
hdparm -S 36 /dev/hdb
In order, these commands will: cause the drive to switch to Standby mode, switch to Sleep mode, and finally set the Automatic spindown timeout. This last includes a numeric variable, whose units are blocks of 5 seconds (for example, a value of 12 would equal one minute).
14: Wireless speed management: In order to maintain communications as the available signal fades, the radios need to transmit data at a slower rate. Normally, the radios attempt to work out the available signal on their own and automatically select the fastest possible speed.
In fringe areas with a barely adequate signal, packets may be needlessly lost while the radios continually renegotiate the link speed.
Fonte: 14 Tips For Linux Geeks