Linux has been used for some time, to tidy up the common Linux commands
RELATED links:
Linux command finishing-basic operations
Linux Command collation-user management
1.ls Directory Enumeration (dir)
Generally we write this:
Linux Code
- Ls
Enumerating all the files in the current directory, if there are many files, it is very complicated. We can add keywords, for example we want to see all the files that contain XML.
Linux Code
- LS *xml*
If this time, we want to see the owner information of these files can be written like this:
Linux Code
- Ls-la
2.cd Directory Switching
As with other directory switching commands, there is no difference.
Linux Code
- CD A
Switch to the A directory.
3.chown Change the owner of a file (folder)
Above through LS we see a bunch of files, there may be files we can not operate, this time requires the root account to execute the chown command to change the file belongs to, you can write:
Linux Code
- Chown Boss.boss *
This operation is to give all the files in the current directory to the boss user and the boss Group user all rights. So the files (folders) under the Sub-folder need to be modified how to do it? Perform
Linux Code
- Chown-r Boss.boss *
4.mkdir Creating a directory
This command is simple enough to perform
Linux Code
- mkdir x
We have built an X directory under the current directory.
5.cat File View
We can view the contents of the file via the cat command and execute
Linux Code
- Cat A.xml
We can view the contents of this file, of course, in textual form.
6.tail File View (can track files)
If this command does not add parameters, and Cat no difference, the final thing is that he can track the contents of the file, we often use it to monitor the log, such as
Linux Code
- Tail-f Javaeye.log
When the Javaeye.log file grows, we can capture this change in the console, and if the log file changes quickly it looks like a scene in The matrix (black-green, no-stop brush!). )。
7.tar File Compression
Compression decompression, which is the basic operation of the deployment effort.
Linux Code
- TAR-ZVCF java.tar.gz Java
All files containing subfolders under the Java directory are compressed into java.tar.gz files.
In turn, the unzip execution
Linux Code
- TAR-XZVF java.tar.gz
8.rm Delete
Tossing so much, generating a heap of junk files. Clean up quickly, hehe!
Linux Code
- RM *
Oh, my God! It's horrible! Fortunately did not carry out!!! Brothers, remember that you must not use this command when you execute the DELETE command!!! If you are a super administrator, it will be possible to delete all the files, the system will be paralyzed in the moment of reboot!!! It's a good idea to specify a filename or path name to avoid all deletions, which is suicide! Oops, the directory can not be deleted, there are sub-files can not be deleted what to do?
Linux Code
- Rm-r XML
This allows you to completely delete the XML directory.
9.su Super User command
Just doing chown, we need to switch to the superuser, the root user, what to do? Perform
Linux Code
- Su
Follow the prompts to enter the root user password and easily switch to Superuser. This account is not recommended for non-essential situations!
10.vim (vi) text editing
This is a bit more complicated, so let's just say that simple operations can meet our needs. Writing a file is nothing more than writing something in. VI, VIM use up, feel or vim comfortable a bit. Edit a file,
Linux Code
- Vim A.txt
Now that the file is open, but you cannot edit it, type i. Tip Insert, insert State, we can insert text. Finished,Ctrl + C end the input status, type : w, Save does not exit, type : Wq, save exit. What if you don't save a forced exit? Type : q!. Of course, if you just come up and look at the content to exit directly, then type : Q . If you want to find a keyword in the file, you can type/ x. / means search, andx is the keyword.
11.cp File Copy
This command is an abbreviation for the copy Word, such as we want to do a file/directory backup, you can use this command:
Linux Code
- CP A.txt A.txt.bak
In this way, the backup file A.txt.bakis obtained from the a.txt file.
If you want to copy a directory, you need to use the parameter- R:
Linux Code
- Cp-r a B
This allows you to copy the A directory into the B directory.
12.mv File Clipping
This command is an abbreviation for the move word that can be used to cut/rename files and directories.
This command was originally intended to cut the operation, but from its point of view, it is suitable for the name of the duplicate!
Linux Code
- MV A C
A is a file, it can be a directory, the above operation, a file/directory becomes a c file/directory!
13.mount Device Mount
Linux Code
- Mkdir/media/cdrom
- Mount-t Iso9660/dev/cdrom/media/cdrom
-T iso9660 Optional
14.umount Device Uninstall
Linux Code
- Umount/media/cdrom
15.env Environment Variables
env---------------------------------------------------------------------------------[sticky] Linux Environment basic configuration
Blog Category:
- Server Architecture/basic
- Os/linux
Linuxjava_hometimezonedns A, java_home have days did not match the Linux environment, incredibly already began unfamiliar. Vim ~/.profile Configuring the JAVA environment, configuring time zones wrote #Java环境export Java_home=/usr/bin/javaexport classpath=.: $JAVA _home/lib/dt.jar: $JAVA _ Home/lib/tools.jar export path=.: $JAVA _home: $PATH then load the file:. ~/.profile Second, TimeZone or modify ~/.profile file Vim ~/.profi ...
- 2014-11-14 15:23
- Browse 292
- Comments (0)
- Category: Operating system
[Top] Conquer Zookeeper's basic configuration
Blog Category:
- Server Architecture/basic
Zookeeperjava people, always inevitable knot, limit themselves, difficult to move forward. The understanding of zookeeper, as well as the practice has dragged on for a long time, today to learn a little bit, fill some dry. First, briefly zookeeper is Google's chubby an open source implementation, is a highly effective and reliable collaborative work system, zookeeper can be used to elect leader (based on Fast Paxos protocol), configuration information maintenance, in a distributed environment, Requires a master instance or stores some configuration information to ensure consistency of file writes. Zookeeper is a distributed, open-source, distributed application Coordination service that contains a simple set of primitives that is an important component of Hadoop and HBase, providing both Java and C interfaces. Zookeep ...
- 2014-11-14 14:28
- Browse 783
- Comments (3)
- Category: Open source software
[Top] Conquer Mongodb master-slave Replication & cluster replication
Blog Category:
Mongodbmaster slavereplicate setprimarysecondary Lianpo old, passable rice? and then! MongoDB research is always intermittent, need to continue to operate, to accumulate, for future work to provide reference. The end of the year, the use of the thing to do a convergence. Clean up the stuff that was written at the beginning of the year. Today try a copy of the cluster Replicateset mode, do a small summary, follow-up in this post is constantly filled. Cluster configuration RELATED Links: Conquer MongoDB Installation and system service configuration Conquer MongoDB Master-slave Replication & cluster replication Basic operations RELATED links: Common commands for conquering MongoDB, basic data types The modifier of the conquest of MongoDB Conquer Mongodb modifier Enhanced ...
- 2013-11-14 15:44
- Browse 5278
- Comments (3)
- Category: Databases
Top GPG operation--Signature verification
Blog Category:
GPGPGP recently reviewed the previous contact but did not understand the technical problems, and gradually restore the blog high-yielding habits ~ Problem Description: You may have encountered the software during the download process due to the network caused by the download of software volume and actual software volume does not match. The most common approach is to attach a summary file to the download file. This approach is more common and easier to implement. However, there is still a problem: if I tampered with the site, changed the contents of the file, and made a summary of the file, replaced the original summary file. The user's downloaded file loses the meaning of the digest verification. How can we avoid this problem? Solution: The software provider signs the file, and the software user verifies the file. Signature/Verification is a common method for authenticating the validity of network data transmission, which belongs to the field of asymmetric encryption algorithm. Use the private key to sign the data, use the public key to ...
- 2013-05-30 10:15
- Browse 2079
- Comments (0)
- Category: Open source software
Top Linux command Collation--file Operation--join
Blog Category:
How do you make yourself strong in linuxjoin work? Learn from the people around you! Colleagues to help Linux the next two files in the same part of the filter, the data file is very large, how to operate. Finally found the cattle, I just stopped stealing the teacher's apprentice. RELATED links: Linux command finishing-basic Operations Linux command collation-user management one or one-like association for example there are two files: wrote $ cat 1a 100b 200c 300d $ cat 2c 2012-03-01d 2012-0 5-01A 2012-01-01 I want two files that match each other, that is, part A, C, and D. Wrote $ Join 1 2c 2012-03-01d 500 2012-05-01 ...
- 2013-05-23 14:58
- Browse 1568
- Comments (0)
- Category: Operating system
[Top] Big data processing drip notes
Blog Category:
Kafkastormhadoop self-brainstorming, right and wrong, please advise, follow-up supplement. The three major hotspots: High concurrency, distributed, big Data (and maybe, many, three goals of self-cultivation). Big Data processing systems have several requirements: low-latency high-performance distributed scalability (more requirements are scale-out) fault tolerance now uses more than Hadoop, Storm. Hadoop relies on HDFs disk latency high (can be accurate to hours) the statistical results of the HBase Storm relies on a short (can be accurate to 10 seconds) statistical results in the MySQL data collection, handed to Kafka Kafka is the LinkedIn open source of a distributed Publish-Subscribe message system, which has: ...
- 2013-04-16 13:00
- Browse 2297
- Comments (0)
- Category: Open source software
Top GITLAB Installation Issues
Blog Category:
- Os/linux
- Server Architecture/basic
Gitlab is a good thing, but it is hard to set up. There are still some minor problems with the use of ubuntu+mysql in the official documentation. Reference Document execution: Sudo-u gitlab-h bundle EXEC Rake Gitlab:setup Rails_env=production encountered: wrote Gem files would remain installed In/ho me/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/mysql2-0.3.11 for inspection. Results logged To/home/gitlab/gitla ...
- 2013-03-21 11:35
- Browse 2401
- Comments (0)
- Category: Open source software
Top Thrift Xiao Kee
Blog Category:
- Server architecture/distributed
Thriftjavathrit with not much, also not enough depth, here small remember a pen. For the thrift environment How to install, you can refer to the official website. or directly download the Windows version of Thrift-0.9.2.exe Thrit with Java has a data type mapping relationship:/** * The first thing to know about is types. The available types in Thrift is: * * bool Boolean, one BYTE * byte signed byte * i16 signed 16-bit integer-...
- 2013-03-14 18:37
- Browse 2418
- Comments (0)
- Category: Open source software
[Top] Conquer Redis + Jedis + Spring (iii)--list operation
Blog Category:
- Db/nosql
- Spring
- Server architecture/distributed
Redisjedisspring-data-redislist began to think that spring under the operation of a hash table, list, is really so earth. Trance found "stringredistemplate.opsforlist ()" Strong, seize the time of evil fill. RELATED links: Conquer Redis conquer Redis + Jedis conquer Redis + Jedis + Spring (one)--Configuration & General operations (GET S ...
- 2013-03-06 16:16
- Browse 14478
- Comments (2)
- Category: Open source software
[Top] conquer Mongodb modifier enhanced
Blog Category:
Mongodbmodifier through the Find/findone did a simple query, trance found that seems to be less something, seems too simple. Here is a supplement, simply say the various $ keywords: $lt, $gt, $lte, $gte and so on. Find yourself digging a hole for yourself, deep and wide, need to jump out of the breath early. Cluster configuration phase?? ...
- 2013-02-07 15:57
- Browse 1413
- Comments (0)
- Category: Databases
[Top] The modifier of the conquest of Mongodb
Blog Category:
Modifiermongodb thought that MongoDB's crud is some normal operation, but in fact, there are many specific instructions-modifiers for fields and arrays. I really don't know how to give a reliable name to the instructions that start with the $ sign. Cluster configuration RELATED Links: Conquer MongoDB Installation and system service configuration Conquer MongoDB Master-slave Replication & cluster replication Basic operations RELATED links: Common commands for conquering MongoDB, basic data types The modifier of the conquest of MongoDB Conquer MongoDB modifier enhance the conquest of MongoDB's CRUD in MongoDB, there are many special standards called modifier ...
- 2013-02-06 14:37
- Browse 2346
- Comments (0)
- Category: Databases
[Top] The CRUD to conquer Mongodb
Blog Category:
This period of time is always difficult to invest in research work, now to holiday, home of 7788, no matter, and then finishing. Cluster configuration RELATED Links: Conquer MongoDB Installation and system service configuration Conquer MongoDB Master-slave Replication & cluster replication Basic operations RELATED links: Common commands for conquering MongoDB, basic data types The modifier of the conquest of MongoDB Conquer MongoDB modifier enhance the conquest of MongoDB's CRUD MongoDB installation, configuration master and slave, and related basic data types, as detailed in the previous blog. Next we do some of the most useful part--crud.
- 2013-02-06 10:34
- Browse 2055
- Comments (3)
- Category: Databases
[Top] Common commands for conquering Mongodb, basic data types
Blog Category:
Mongodbjavascript Common Command Basic data types in hand there is this "MongoDB authoritative guide", intends to do a reading notes, the General command, data type over and over, forcing memory. Cluster configuration RELATED Links: Conquer MongoDB Installation and system service configuration Conquer MongoDB Master-slave Replication & cluster replication Basic operations RELATED links: Common commands for conquering MongoDB, basic data types The modifier of the conquest of MongoDB Conquer MongoDB's modifier enhance the conquest of MongoDB's CRUD about how to install, configure, start Mongodb, and so on, refer to the previous article. General Command login similar to MySQL login ...
- 2013-01-23 15:41
- Browse 2073
- Comments (0)
- Category: Databases
Top Nginx extension (i): Nginx_tcp_proxy_module
Blog Category:
- Server architecture/distributed
Nginxtcpthrift good Things must continue to study, and continue to accumulate, especially to make a note. Today is to steal a teacher, the little brother used to record things quickly. The main purpose of this study is to solve the problem of load balancing in thrift. Refer to Nginx_tcp_proxy_module, download, install, do a simple configuration. You can download the latest version directly: wget https://github.com/yaoweibin/nginx_tcp_proxy_module/archive/master.zip Assuming you've installed Nginx, and switch to nginx installation directory, perform patch operation, and install: Patch-p1 </path/to/nginx_tcp_p ...
- 2013-01-15 16:41
- Browse 5005
- Comments (1)
- Category: Open source software
Top Enforce case sensitivity when MySQL queries
Blog Category:
MySQL case sensitive binary usually rarely considers that data storage requires explicit case of string type fields, and MySQL default queries are not case sensitive. But as user information, once the user name repeats, it will waste a lot of resources. Moreover, Li Kui, Li Ghost of more up, detective difficult to distinguish. To do this, either make the table explicit case-sensitive (the field is case-sensitive). If all the fields in the overall database need to be case sensitive, you might as well adjust the character set. However, this is not usually recommended. If, like me, the database is already running online, millions data on a table, making a change in the field type can lead to a database outage. Well, in the query, add a word good! For example, General query: SELECT * from U WHERE name like ' a% '; Selec ...
- 2012-09-20 09:40
- Browse 4158
- Comments (6)
- Category: Databases
«prev 1 2 3 ... 10 11 Next»
Linux command finishing-basic operations