I’ll just dump some frequently used command line snippets here.
gzip -d file.gz
Unzipping a .tar archive:
tar -zxvf file.tar
Importing a database dump:
mysql -u[username] -p[password] database < file.sql
mysql -p -u username database < file.sql
You will be prompted for your database user password.
Exporting/dumping a database:
mysqldump --databases database > dump.sql
mysqldump database > dump.sql
mysqldump -u username -p[password] database > dump.sql
Listing the contents of a directory with details (permissions, size, etc.):
Once a week or so we send an email with our best content. We never bug you, we just send you our latest piece of content.
If you found any value in this post, agree, disagree, or have anything to add - please do. I use comments as my #1 signal for what to write about. Read our comment policy before commenting! Comments such as "Thank you!", "Awesome!", "You're the man!" are either marked as spam or stripped from URL.