nameFiles or directories accessed within find/home-amin-1010 minutesFiles or directories accessed within find/home-atime-1010 hoursFiles or directories that have changed in find/home-cmin-1010 minutesFind/home-ctime + 1010 hours ago changed files or directoriesFind/home-size +10k to find files of size 10k in the/home directoryREDIRECT CommandLs-l > A.txt The contents of the list are written to the fileLs-l
contentLess: page displays the contents of the file, space to view the next page of content, the upper and lower keys can also view the upper/next page contentgrep: Display the content found in text (grep displays only what is found, Cat displays text so content)Grep–n displays the number of rows that the content contains|: Pipe command, give the result of the previous command | The following command is processed. (one command can have multiple pipe commands)Find: File LookupFind file path –nam
exec or OK to execute the shell command:Just write the desired action in a file and you can use exec to find it with the Find command.1) display all files larger than 10k under the current directory, exec executes a command after, {} represents the file name[[email protected] ~]# find. -type f-size +10k-exec ls-l {} \;-rw-r--r--. 1 root root 12288 may 4 17:22./. TEST.TXT.SWP-RW-------. 1 Roo T root 40960
,0.00043seconds,238mb/s Use the split command to split the Date.file file created above into a small file of size 10KB: [[emailprotected]split]#split-b10k date.file[[emailprotected]split]#lsdate.filexaaxab xacxadxaexafxagxahxai xaj The file is split into multiple suffix files with letters, and if you want to use the-D parameter with a numeric suffix, you can specify the length of the suffix by using-a length: [[email protected] split]# Split-b 10k dat
finding whether a value is included in an ordered array is as follows:
public static Boolean Usearraysbinarysearch (string[] arr, String targetvalue) {
int a = Arrays.binarysearch (arr, targetvalue);
if (a > 0)
return true;
Else
return false;
}
Complexity of TimeThe following code can approximate the time cost of various methods. The basic idea is to find a value from the array, the size of which is 5, 1k, 10k, r
files equal to 10k, then 9.2k, 9.31k, 10.1k and so will be treated as 10k and be matched to, and 9k 11.1k and so on will notCombination conditions:-A: With-O: Or-not: Non--mtime: According to the modified (modify) time-atime: Accessing (Access) time-ctime: Changing (change) time[+|-]#:+ represents a time before--represents the day by default.(Atime and CTime differences: atime modifying data, CTime modifyi
Delete all content (including directories and files)ln establishes a symbolic connection, like Windows, which creates a shortcut to a file.Ln-s source target such as Ln-s/etc/inittab Inittab (inittab pointing to actual file/etc/inittab)More displays the contents of the file when the paging displayLess displays the contents of the file with paginationgrep queries the text for content such as "grep main Hello.java", "Grep-n main Hello.java" Displays the line number of the row| Pipeline commandThe
The advantage is small, only a dozen lines of code, but the disadvantage is also obvious, only support IE and the browser with IE as the kernel, plug-in +flash control method –zeroclipboard
For the use of non IE kernel users, of course, do not give up, hoping to find a comprehensive and compatible way, a site in a chop, this plugin zeroclipboard to be stripped down, the plug-in can support all browsers, but the shortcomings are obvious, first of all, based on the jquery library, The size of the
the way the regular expression is implemented.
For example:
[Root@www ~] # locate passwd
/etc/passwd
/etc/passwd-
/etc/news/passwd.nntp
/etc/pam.d/passwd
Find: Finding Any File
The Find command has the following format:
Find [PATH] [option] [action]
4.1 Find parameter: Search based on file name
The parameters related to the file name are as follows:
-name FileName: Finds a file named filename. FileName can be represented using regular expressions.Example:
[
Clipid=components.interfaces.nsiclipboard;if (!clip) return false;Clip.setdata (Trans,null,clipid.kglobalclipboard);}Alert ("The following content has been copied to the Clipboard nn" + maintext);}
Second, the plug-in +flash control method –zeroclipboardfor the use of non IE kernel users, of course, do not give up, hoping to find a comprehensive and compatible way, a site in a chop, this plugin zeroclipboard to be stripped down, the plug-in can support all browsers, but the shortcomin
page will be delayed 3, 4 seconds, you are finished. Of course, if your host and visitors in different countries, 3, 4 seconds can be original, for local visitors, 3-4 seconds of download time is already the limit. Over this time, every second, you will lose 10% of the traffic. And that 10% of the flow may be the difference between success and failure.
d) Page size
The smaller the better, the better to stay below 15K. The smaller the better, the better to stay below 12K. The smaller the bette
systems.The channel also supports bulk write or read multiple buffers. The general operating system supports bulk write or read buffers from the underlying, so Java translates bulk operations into the system's underlying API calls, allowing the operating system to complete bulk operations, so it is fast.A file channel can only be a blockage channel. There are many other operations than filestream,filechannel, such as specifying that data is written at a location. File channel creation requires
Division stage. However, for example, on Linux, reading a disk file must be asynchronous I/O through the kernel, but the Nginx event module on Linux does not support this practice when asynchronous I/O is not turned on, so that we can only write read file calls: The 10M is divided into 100 parts, each reading 10K size. So the 10K is read per phase, which splits the event.
When "nothing" and must wait for t
the factory that creates the Fileitem object including methods:
1.public void Setsizethreshold (Int?sizethreshold)Sets the size of the memory buffer, the default value is 10K, and if the file is greater than 10K, the temporary file is used to slow
Save upload file.
2.public void Setrepository (Java.io.File repository)Specify a temporary file directory
3.public diskfileitemfactory ();
Servletfileupload is
c10k Problem
The server application domain is very old. A well-known problem is that a single server should support concurrent 10K-level connections, which may remain alive.
To solve this problem, there are two main ideas: one is to allocate a separate process/thread for each connection processing, the other is to handle several connections simultaneously with the same process/thread. each process/thread handles a connection
This idea is the most dir
command to the following command processing
"Case" ls‐l/etc/| More
Man [command], assistance, similar to help in DOS
Find, search for files and directories. In Linux, because file systems are made up of hierarchical structures, it is not easy to find specific files and directories throughout the system. and the "Find" command solves the problem.
searches for and displays files and directories of the specified name in a specific directory
"case" found/-name man: means to search for a file or d
" find/home-atime-10: Files or directories accessed within 10 hours"Case" find/home-cmin-10: Files or directories that have changed in 10 minutes"Case" Find/home-ctime + 10: A file or directory that was changed 10 hours ago
- search for files of a specified size"Case" find/home-size +10k: means to find files with a size of 10k in the/home directory
-redirect command-Ls-l > A.txt, the contents of the list ar
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.