Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ NET Developers need to know some Linux commands     - Quagga use authentication on strengthening BGP session security (Linux)

- Python objects (Programming)

- Struts2 Result Types (Programming)

- Install Python 3.3.4 under CentOS 6.4 (Linux)

- Fast Learning Clojure (Programming)

- Linux operating process information (Linux)

- To use Linux to create a secure managed gateway (Linux)

- MySQL Online DDL tools of pt-online-schema-change (Database)

- Oracle 11g logical standby achieve BI needs (Database)

- Modify MySQL character encoding under Linux (Database)

- Linux Apache server security (Linux)

- Oracle table compression Technology Introduction (Database)

- About enhanced Linux / Unix server system security program (Linux)

- Use the vi text editor and copy and paste Linux tips (Linux)

- ActiveMQ5.11.1 and JDK version matching relation (Linux)

- MySQL database under Linux to achieve automatic backup scheduled backup day (Database)

- Install Rubinius testing Ubuntu 14.04 native threads (Linux)

- CentOS 6.5 Linux System Customization and Packaging Quick Implementation Script (Linux)

- When Vim create Python scripts, vim autocomplete interpreter and encoding method (Programming)

- Linux start the process (Linux)

  NET Developers need to know some Linux commands
  Add Date : 2018-11-21      
  As a cross-platform .NET development era developers, some commonly used Linux commands must master. Instant usual development process does not use Linux (Unix) or mac system, also need to master Linux command. Because many servers are Linux systems. Therefore, to and from the server machine, it is necessary through shell commands.

This article does not explain in detail on all commands, just give common usage and interpretation. Specific usage can use --help to view the help.

1. Find File

find / -name filename.txt filename.txt find the file / directory by name.

find. -name "* .xml" recursively find all the xml file

find -name "* .xml" |. xargs grep "hello world" recursive search xml all files contained in the content of hello world

grep -H 'spring' * .xml find it contains some spring xml file

find ./ -size 0 | xargs rm -f & delete files with zero size files

ls -l | grep '.jar' find the current directory of all the jar files

grep 'test' d * d to display all rows in the beginning of the file that contains the test.

grep 'test' aa bb cc show match aa, bb, cc file test line.

grep '[a-z] \ {5 \}' aa show all contain each string of at least five consecutive string of lowercase characters line.

2. Check if a program running

ps -ef | grep mono See all the processes related to mono

3. Termination Thread

kill -9 19979 19979 terminate the thread, bit process

4. Review the files that contain hidden files

ls -al

5. The current working directory


6. Copy the file

cp source dest Copy files

cp -r sourceFolder targetFolder recursive copy the entire folder

scp sourecFile romoteUserName @ remoteIp: remoteAddr Remote Copy

7. Create a directory

mkdir newfolder

8. Remove directory

rmdir deleteEmptyFolder remove empty directory rm -rf deleteFile recursive directory delete all content

9. Move files

mv / temp / movefile / targetFolder

10. Rename

mv oldNameFile newNameFile

11. Switch user

su -username

12. Modify the file permissions

chmod 777 file.cs //file.cs permission -rwxrwxrwx, r for read, w for write, x for executable

13. archive

tar -czf test.tar.gz / test1 / test2

14. Identify the compressed file list

tar -tzf test.tar.gz

15. Unzip the file

tar -xvzf test.tar.gz

16. View header 10 lines

head -n 10 example.txt

17. Review the end of the file line 10

tail -n 10 example.txt

18. Check the log file type

tail -f exmaple.log // This command will automatically display the new content, the screen only displays 10 lines of the (settable).

19. Use the super administrator Run

sudo rm a.txt use administrator to delete the file

20. See Port occupancy

netstat -tln | grep 8080 8080 View port usage

21. What is the procedure to view the port

lsof -i: 8080

22. Check process

ps aux | grep jexus View jexus process

ps aux view all processes

23. to list the contents of a directory tree

tree a

ps: use the tree command under Mac

24. File Download

wget http: //file.tgz install wget command under mac

curl http: //file.tgz

25. Network Detection

ping www.linuxidc.com

26. Remote Login

ssh userName @ ip

27. Printing Information

Print value echo $ ZOOKEEPER_HOME zookeeper home environment variables

28.Mono common commands

mono, mcs, gmcs, makecert etc.

29. Other Commands

svn git
- Linux system security Comments (Linux)
- CentOS7 installation performance monitoring system (Server)
- Nginx Installation and Configuration (Server)
- Linux Nginx FastDFS integration module is installed Nginx and FastDFS (Server)
- Optimized to minimize the installation of CentOS 5.8 (Linux)
- Python interview must look at 15 questions (Programming)
- The AWK use Cygwin tools mysql binlog log viewer (Database)
- Use Bosh deploy CloudFoundry problems encountered on OpenStack (Server)
- MySQL import large amounts of data (Database)
- Single-node Hadoop environment to build (Server)
- The Rabbitmq installation under CentOS 6.4 (Linux)
- Linux (Debian) install software, missing dynamic link libraries .so (Linux)
- Ubuntu 14.04 and derivative versions of the user install Pantheon Photos 0.1 (Linux)
- Linux remote landing system (Linux)
- Taught you how to install Ubuntu Linux (Linux)
- Setting the RedHat9 Intrusion Detection System (Linux)
- Vim plugin installation YouCompleteMe (Linux)
- How to install CentOS CentOS web page (Server)
- Spacewalk Linux system configuration and installation (Linux)
- Oracle Linux 6.4 installed Oracle 11gR2 + RAC + ASM (Database)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.