Basic Linux Commands
Viewing, copying, moving and deleting files
| ls | Display the contents of the current directory |
| ls -a | Display also hidden files and hidden directories |
| cp filename /path/dir_name | Copy filename into directory /path/dir_name |
| cp -r dir_name /path/dir_name2 | Copy the entire dir_name into /path/dir_name2 |
| cp filename1 filename2 /path/dir_name | Copy filename1 and filename2 into /path/dir_name |
| rm name | Remove a file or directory called name |
| rm -r name | Remove an entire directory as well as its included files and subdirectories |
| mv filename /path/dir_name | Move filename into /path/dir_name |
| mv filename1 filename2 | Rename filename1 to filename2 |
| cat filename | Display filenames contents |
| more filename | Display filename in pages. Use spacebar to view next page |
| head filename | Display filenames first 10 lines |
| head -15 filename | Display filenames first 15 lines |
| tail filename | Display filenames last 10 lines |
| tail -15 filename | Display filenames last 15 lines |
| pwd | Display current directory |
| cd /path/dir_name | Change to directory /path/dir_name |
| cd .. | Go 1 directory up |
| mkdir dir_name | Create directory dir_name |
| rmdir dir_name | Delete directory dir_name |
Read more
How To Reset MySQL Root Password
I setup MySQL Server
on CentOS few month ago, but i forgot the root password for MySQL. How to reset the password?
You can recover MySQL database server password with following steps.
Step # 1: Stop the MySQL server process.
service mysqld stop
Step # 2: Start the MySQL (mysqld) in safe mode with the –skip-grant-tables option
mysql_safe -skip-grant-tables-u root & Read more
Mac OS X 10.5 Tricks – Quick Look preview content of folder in semi-transparent
Quick Look is a quick preview feature which was introduced in Mac OS X 10.5 Leopard. Quick look allow us to preview the files, multiple page documents and video with opening them. You just have to select the files in the Finder and press the Space bar to preview it.
Today, i will going to show you a trick on Quick look. This trick called X-Ray Folder. This feature is hidden by default. We need to enable it through Terminal. Normally when we Quick Look on folder, it will show the regular folder icon. But if you enable X-Ray Folder feature, the folder icon will be semi-transparent, with previews of the folder’s contents visible in the Quick Look window. Read more

