Linux Common settings

Source: Internet
Author: User

1. Folder operations

Create-->mkdir NAME
Remove-->rm NAME
-I ask for confirmation before deleting
-F Direct Delete, not confirm
-R Deletes the directory, which is the following file
Example: Delete all the C language Program documents, delete the previous query confirmation
Rm-i *.c
Example: Delete all files in the work subdirectory and subdirectories
Rm-r work
* Note: There is no Recycle Bin in Linux

2. Renaming, moving of folders

MV Command example: Renaming directory A to B
MV A B
Example: Move the/a directory to/b and rename to C
mv/a/b/c

3. File operation

VI command
VI NAME Open or new file
Example: Create a a.txt and save
VI a.txt
Hello world!
: Wq
When you are finished editing, press ESC and enter: Q for exit: Wq means exit after saving

4.MAC Terminal Remote Control Linux

Telnet-->ssh command
SSH root[user name]@*.*.*.*[ip address]
File Transfer-->SCP command
SCP./... [File to transfer] [Email protected]*.*.*.*:/... [Server file Address]
Example: transferring a local file to a server
Scp-r/... [Local file Address] [Email protected]*.*.*.*:/... [Server file Address]

5. View the process

To view the process number for port 8080
$ps-ef|grep 8080

View the process number that Tomcat occupies
$ps-ef|grep Tomcat

NETSTAT-TLN//indicates that the port being listened to is viewed in digital form

NETSTAT-AP//View all application usage ports

sudo vi/etc/profile//View environment variable configuration file

Details: http://blog.csdn.net/luxideyao/article/details/37777639

6. View System Environment variables

1.export command
Modify:
Export Java_home= "..."
* Note: When modifying PATH, add $path at the end, i.e. system variables (System operation commands such as LS,CD, etc.)
Cases:
Export path=/home/develop/android-sdks/platform-tools/: $PATH

Details: http://blog.csdn.net/wushiyilou/article/details/7956228
2. Modify the/etc/profile file
Cases:
sudo vi/etc/profile

Details: http://blog.sina.com.cn/s/blog_688077cf01013qrk.html

7.w3m Open Web Links

Details: http://www.blogjava.net/hxlistiancai/archive/2011/09/23/359364.html

Linux Common settings

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.