Powered by Tech-Attacks

Frequently used Putty commands

Frequently used Putty commands -http://techattacks4u.blogspot.in/
Hello readers, after a long time we are going to update our blog, with the usefull post - "Several Frequently used Putty commands".



Before reading further article Please take a second to Bookmark TechAttacks for your later use or For more Updates Follow us on our BLOG or get tuned by simply Liking Tech-Attacks on Facebook.
Database Dump:
mysqldump -u username -h localhost -p dbname > filename.sql

Import Database Dump:
mysql -u username -p -h localhost DATA-BASE-NAME < data.sql

Tar a folder:
tar -cv foldername > foldername.tar

GZip the tar file:
gzip foldername.tar

Extract tar.gz file:
tar -zxvf yourfile.tar.gz

Extract .bz2 file:
bunzip2 yourfile.bz2

Extract tar.bz2file:
tar jxf backup.tar.bz2

Copy files from source to destination:
cp source destination cp dir1 dir2 cp -option source destination cp -option1 -option2 source destination

Linux remove entire directory including all files and sub-directories

Command To remove all directories and subdirectories use rm command. For example remove *.doc files and all subdirectories and files inside letters directory, type the following command
Note: all files including subdirectories will be deleted permanently.
 
$ rm -rf letters/

Where, -r : Attempt to remove the file hierarchy rooted in each file argument i.e. recursively remove subdirectories and files from the specified directory.
-f : Attempt to remove the files without prompting for confirmation, regardless of the file's permissions.

No comments:

Post a Comment