#include
#include
#include
The file where the #include //stat function is located
#include
int main (void)
{
DIR *DP;
struct Dirent *ep;
struct STAT st;
Char dirp[50];
printf ("Please input a dir name:/n");
scanf ("%s", &DIRP); Read
Today I have to make my algorithm running in parallel into order to make it faster. At the used following way to implement Multi-process:
unsigned int proc_num = 5;
pid_t* pids=new Pid_t[proc_num];
Double incr= (double) n/(double) proc_num;
/*
First, modify the/etc/profile file This method is recommended when this machine is used only as a development use, because all user's shell has the right to use these environment variables in this configuration, which may bring security problems to
Files that are compressed on windows are compressed by the system's default encoding Chinese. Because the zip file does not declare its code, so Linux unzip generally with the default encoding decompression, Chinese file name will appear
Modifying environment Variables
Modify the new Tomcat bin/catalina.sh file, plus the newly configured environment variable
Modify the following in the new Tomcat8.5/con/server.xml
This article does not do other superfluous explanation, just
under Linux , if you need to add a service that runs automatically as the system starts, just add it to the /etc/rc.d/rc.local script file.
But there is a problem is that the script can be terminal under the boot of the normal operation, placed in
Linux every once in a while will upgrade the kernel, so fill the loophole, but brought us a bad mood, because I am a multiple system machine, so every boot grub is a big option, is very bad, recently in the online search vegetarian, and finally
In this article, Linux refers to the "kernel" of an operating system, not a "Linux distribution". November 25, Linux founder Linus Torvalds received the "information weekly" E-mail interview, clearly illustrate some of his own important points,
redhat6.2 on the LVM.
1
First, add a hard drive to RH on the virtual machine.
2
Start RH
3
Enter on the terminal
[beigang@localhost~] $fdisk-L
disk/dev/sdc:1073 MB, 1073741824 bytes
......
DISK/DEV/SDC doesn ' t contain a valid partition
After installing Linux today, set up the JDK7 environment variable in/etc/profile, after the source command, run Java or the system default 1.4 jdk. Let me take a look at the steps I'm doing,
1, first which Java, look at the system default Java is
File Operations Replication command CP (copy)
Usage: CP [options] ... [-t] source purpose
OR: CP [options] ... Source... Directory
OR: CP [options] ...-t directory source ...
Copy files to to .
Here are a few of the more important
1. Find
Find is the most common and powerful search command you can use to find any file you're looking for.
Find uses the following format:
$ find
-
-
-
If nothing is added, find defaults to search the current directory and its subdirectories,
---View the default maximum number of file handles for the system, which defaults to 1024
# Ulimit-n
1024
----See how many handles are open for the current process
# Lsof-n|awk ' {print $} ' |sort|uniq-c|sort-nr|more
131 24204
57 24244
57 24
A
B
C
Cat
Copy file File1 to File2 can I use which of the following commands ()
CP file1 file2
cat file1 >file2
Cat file2
DD if=file1 of= File2
cat File1 | cat >file2
//Can be
CP command: The CP directive is used to copy files or directories.
1. Download Hive tarball 2. Unzip (upload the package to Linux with Xftp)TAR-ZXVF apache-hive-1.2.1-bin.tar.gz 3. RenamingMV Apache-hive-1.2.2-bin Hive 4. (Hiveis a tool ) so after extracting the start service in the bin start command for ./hive
1. Temporarily set IP address:Enter the Ifconfig eth0 (default is the first NIC) followed by the IP address, netmask, and gateway, and if not set, use the default mask, such as:Ifconfig eth0 192.168.187.16Note: Notice that this method is modified
1. Compression/Decompression01-.tar format unpacking: [*******]$ tar xvf filename.tar pack: [*******]$ tar cvf filename.tar DirName (Note: Tar is packaged, not compressed!) ) 02-.gz format decompression 1:[*******]$ gunzip filename.gz decompression 2
Linux management commands, IprouteTo view the Help file:Mans IPthe following are common Help files。See ALSO IP-address (8), Ip-addrlabel (8), IP-L2TP (8), Ip-link (8), Ip-maddress (8), Ip-monitor (8), Ip-mroute (8), Ip-neighbour (8), Ip-netns (
Download JDK Compression packJdk-8u111-linux-x64.tar.gzUpload JDK to serverUnpacking the installation package#sudo tar-zxvf jdk-8u111-linux-x64.tar.gz (root user does not need to add sudo)Move to extract package to installation directory
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