Last active
October 24, 2015 10:13
-
-
Save morad7/48c4eb5c5428a57a7c94 to your computer and use it in GitHub Desktop.
Ubuntu commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//You can easily memorize it if you consider telling tar to e X tract a F ile | |
tar xf community_images.tar.gz -C /home/emmys/Pictures/Community/ | |
//You can run the following command to reveal your server’s IP address. | |
ifconfig eth0 | grep inet | awk '{ print $2 }' | |
//To copy a file from B to A while logged into B: | |
scp /path/to/file username@a:/path/to/destination | |
//To copy a file from B to A while logged into A: | |
scp username@b:/path/to/file /path/to/destination | |
//Make sure the directory you are copying to on 192.168.0.4 is owned by the user username | |
chown username downloads | |
//logout sshs connection | |
exit | |
//Can scp copy directories? | |
//Yup, use -r: | |
scp -rp sourcedirectory user@dest:/path | |
//import db via commandline | |
mysql -u root -p | |
mysql> use db_name; | |
mysql> source backup-file.sql; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment