First download Item2.
Address: www.iterm2.cn/download
Two, basic configuration
Open the Item2 application and the interface is as follows:
$SSH [email protected] -p 60022 // The user name and IP address should be correctCopy the code
Are you sure you want to continue connecting (yes/no)? yes
Copy the code
[email protected]'s password:
Copy the code
Select the server folder
002: Big Data Products - WebAPI (VPC-2ZE37uqYDLJON90G7jLUl)Copy the code
Enter folder
# cd ..
Copy the code
# ls .. // What is in the current folder
Copy the code
# pwd .. // View the current path
Copy the code
Into the specific folder, such as sending a folder path/root/project20190528 / AQMap – pro/Fairsense – pro3 /
# root/CD project20190528 / AQMap - pro/Fairsense - pro3 / / behind/CD without slashes, finally add slashes
Copy the code
# rz // Upload the file
Copy the code
# sz // Download ZIP, HTML files, not foldersZip -r mysql.zip mysql Zip the mysql folder to mysql.zipCopy the code
Configure iTerm2 Add RZ SZ Click the Settings page of iTerm2 -> Profiles -> Default -> Advanced -> Triggers
Regular expression: rz waiting to receive.\*\*B0100
Action: Run Silent Coprocess
Parameters: /usr/local/bin/iterm2-send-zmodem.sh
Regular expression: \*\*B00000000000000
Action: Run Silent Coprocess
Parameters: /usr/local/bin/iterm2-recv-zmodem.sh
Copy the code
Press Enter will pop up a file selection window, select the file to upload, you can realize the transfer.
# unzip -o dist. Zip
Copy the code
Zip -r tt_fdata_oem.zip./tt_fdata_oem/ / Compressed file, tt_fdata_oem.zip the current file is directly written,./tt_fdata_oem/ The folder to be compressedCopy the code
Iterm2 sets rZ
- Brew Command not found on a MAC
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Copy the code
Configure VPM in iterm2.
VPM: iterm2: iterm2: iterm2: iterm2: iterm2: iterm2: iterm2: iterm2: iterm2 Open the small plane to view IP; Click on the small plane icon -> Preferences… -> View the port number and address that the HTTP proxy listens to
1 Open finder 2 Show the hidden file commend+ Shift +. 3 Locate the.zshrc file
source ~/.zshrc
Copy the code
6 Open the TERMINAL and run the following command
pon
echo $http_proxy
curl -I https://google.com
Copy the code
The output is similar to the following:
HTTP/1.1 200 Connection Established.... HTTP / 1.1...Copy the code
Install LRZSZ
brew install lrzsz
Copy the code
– In a terminal environment, brew –version checks the brew version and verifies whether the brew is successfully installed
Download the iterm2-zmodem script.
Save iterm2-send-zmodems. Sh and iterm2-recv-zmodems. Sh to the /usr/local/bin/mac directory.
chmod +x iterm2-send-zmodem.sh
chmod +x iterm2-recv-zmodem.sh
Copy the code
The input here is directly in iterm2
Configuration iterm2 Trigger
Key points: After opening iTerm2, press the combination keys command and to open the iTerm2 setting interface.
- Select Profiles > Default > Advanced > Triggers > Edit Add two parameters at the pop-up interface click “+”, which must be B010 and B00000000000000 in sequence
\*\*B010 Run Silent Coprocess /usr/local/bin/iterm2-send-zmodem.sh
\*\*B00000000000000 Run Silent Coprocess /usr/local/bin/iterm2-recv-zmodem.sh
Copy the code
Click “Close” to complete the configuration.
swap file “*.swp” already exists! The solution of
Programming in Linux will inevitably open multiple vim edits. If the same file is not saved in the last edit, it will appear in the next edit:
swap file “*.swp” already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:
Linux command
ls [-alrtAFR] [name…] Display contents in the specified working directory #clear is used to clear the screen.
The SSH password login process looks like this:
1) The user sends a login request to the remote host: SSH user@host 2) The remote host receives the login request and sends its public key to the user. 3) Select big data to log in to the server and view the current folder
# pwd
# cd..
# ls
unzip -o app.zip -o
$ exit
$rm -f aaa.ZIP delete aaa.ZIP
# rm -f distcc.zip
Copy the code
Delete file rm file 1 file 2, for example
# rm distl.zip distp.zip distz.zip
Copy the code
Delete all files in the folder rm * -rf Delete some files starting with a fixed letter rm XXX *
rm dist*
Copy the code
Example Delete a class 1 file rm *.txt
8) Server backup and upload, first see how to backup,
Root /project/AQMap-pro/ fairsense-pro3 / $CD backup/ Dist 20190701/ / Rename dist 20190701 to rename file or directory, or move file or directory to another location # mv 20190701/ ./backup/ ‘ ‘// move 20190701 to backup folder
mv 20200110/.. /bak/backup/ Move backup files to the bak folder CD.. Unzip -o dist. Zip: rm -f dist. Zip: rm -f dist. Zip: rm -f dist 20190901
# mv 20190901/ ./backup/ ““
# mv info/ logs // Put the info directory into logs. Note that if the logs directory does not exist, the command renames info to logs $mv /usr/student/*. Move all files and directories under /usr/student to current directory.
Mv /home/ffxh/a.txt /home/ffxh/b.txt // The destination directory is the same as the original directory. The new file name is specified, and the effect is only renamed. Mv /home/ffxhd/a.txt /home/ FFXHD /test/ or mv /home/ffxhd/a.txt /home/ FFXHD /test
// The destination directory is inconsistent with the original directory.
Mv /home/ffxhd/a.txt /home/ffxhd/test/c.txt // The destination directory is the same as the original directory and the new file name is specified. The effect is: move + rename.
Bulk moving files and folders :(works on Ubuntu 18.04)
Mv/home/FFXHD testThinkPHP5 / tp5 / * / home/FFXHD testThinkPHP5 / / to/home/FFXHD testThinkPHP5 / tp5 directory all file & folder to inside / home/FFXHD/testThinkPHP5 < br > note: need to show hidden files command, otherwise, the hidden hidden files and folders will not be moved to the new directory.
Files starting with a dot are treated as hidden files, and folders starting with a dot are treated as hidden folders.
For example, file.a.txt, directory.tp5.