EART60071 Practical Computer language
The note of computer language
1. When we located at the campus internet environmental, I can use the cmd to connect the server.
ssh <username>@130.88.00.00
sftp
2. Download the code
git clone http://github.com/<Project>
3. Access the dictory file
cd <dictoryname>
4. View and Edit the file use nano editor
nano -l <Filename>
5. Run the code
Python3 <Filename> #the result will automatically store at server computer
4. Get the result
#The result will located at /tmp/<username>, first I need get the file name to use SFTP service to download the File
ls /tmp/<username>
#SFTP
get /tmp/<username>/<filename>
#File will automaticly download to local computer, located at C:\Users\<username>
5. Other command
5.1 Delate the file
#If the tmp file is not empty, use the code below to empty the tmp file
rm -rf /tmp/<username>
#rm means remove, use as rm <filename or dirctory>, rm -rf meams delate the file or directories without warning or prompt
5.2 Update the file
#If something new in the git you may need to update the git file, use the following command
git pull
5.3 Reset the git area
#some times you may need to reset the git area as default, you may use the following command, in the git directories type the command.
git reset --hard
5.4 Change drictory (How to use cd command)
1. cd #back to home directories
2. cd ../ #You can go to the parent directory
3. cd ../../ #You can go up multiple directories
评论
发表评论