CentOS calculates the number of files and folders in a folder.

Count the number of files in a folderLs-l | grep "^-" | wc-lCount the number of directories in a folderLs-l | grep "^ d" | wc-lCount the number of files in the folder, includingLs-lR | grep "^-" | wc-LFor example, to count all js files under

Centos searches for files by file size

The find command in linux is used to find files. man find can be used to find files that are omnipotent. Therefore, simply find the file according to the file size. Search for the size from man find. The following information is displayed: -Size n [

Solve the Problem of automatic disconnection after ssh is idle for a period of time

Use a client tool, such as securecrt, to connect to a linux server. Some of them may be disconnected after a period of time without any operation. This is mainly because the vro and firewall exist between the client and the server, and the idle

Rsync synchronizes hidden and excluded files

Basic rsync command syntaxRsync Command Option source directory target directory If the source directory is/var/www/, all the files in the directory will be synchronized to the target directory. If it is/var/www /*, the hidden file in the current

CentOS Operating System log

Common Linux operating system logon files include the following:1)/var/log/secure: The file used to log on to the system to access data;For example, pop3, ssh, telnet, and ftp are all recorded here. 2)/ar/log/wtmp: records the logon information,

DIY Centos Lite version

We all know that the linux system has extremely powerful functions, but sometimes the functions are not necessarily what we want, in some cases, we want a simple system that consumes less resources and runs some basic functions and commands. At this

Tcpkill clear Abnormal tcp Connection

In linux, TCP Connections cannot be released for a long time, such as the FIN_WAIT1 and FIN_WAIT2 statuses. The release time is uncertain and the corresponding program has been closed, and the corresponding ports are no longer monitored, it cannot

Linux inter-process communication

I. Overview of inter-process communicationProcess Communication has the following purposes:A. Data Transmission: A process needs to send its data to another process. The data volume sent is between one byte and several Mb.B. Shared data: if multiple

How to kill botnets under CentOS

1) Check the current zombie Process Information # Ps-ef | grep defunct | grep-v grep | wc-l 175 # Top | head-2 Top-15:05:54 up 97 days, 4 users, load average: 0.66, 0.45, 0.39 Tasks: 829 total, 1 running, 479 sleeping, 174 stopped, 175 zombie #

Detailed explanation of how SVN is automatically started when Centos is started

This section describes how to automatically start SVN when Linux is started. In the previous section, we will explain how to automatically start the SVN service when Windows is started. Through this section, you can make a comparison, let's take a

Detailed explanation of alias commands in CentOS

Alias command Function Description: Some commands that we often use but are very long at system management. Then we can create an alias for these long strings of commands. This long string of commands can be directly replaced by an alias. The system

Improve text search efficiency in CentOS

For system administrators or programmers, grep is probably the most popular tool when they need to search for specific text or patterns in a directory with complex configurations or in a large source code tree. If grep is one of your favorite tools,

CentOS lvm resizing

I. IntroductionLVM is short for Logical Volume Manager. It is a mechanism for managing disk partitions in Linux, LVM is a logical layer built on hard disks and partitions to improve the flexibility of disk partition management. LVM is a logical

CentOS system backup script

#! /Bin/sh # Set Variables Bak_path =/root/bak_linux Date = $ (date + % Y % m % d) Log_file = $ bak_path/$ date # log. log # Write the execution result to the log Exec 1> $ log_file 2> & 1 # Package the directory to be backed up in the $

Search for BOTs on the CentOS Server

When I log on to the server through ssh, frequent delays may occur. When I log on to the firewall, I find that the external network port of the firewall has reached 800 M/s. After checking, I find that the traffic on one server is very high. The

CentOS can end all processes of a user.

In linux system management, we sometimes need to end all processes of a user. Beginners usually first query all the user's PIDs, and then kill them one by one, or write a script. In fact, there are many methods to end. The bloggers summarize the

CentOS common mounting commands

Attach a disk named hda2 to ount/dev/hda2/mnt/hda2-confirm the directory '/mnt/hda2' already existsUmount/dev/hda2 detach a disk named hda2-first exit from the mount point '/mnt/hda2'Fuser-km/mnt/hda2 force uninstall when the device is

Remove online linux Users

1. query online users:[Plain] view plaincopy [Root @ leekwen ~] # W 09: 18: 37up22: 30, 4 users, loadaverage: 0.00, 0.02, 0.00 USERTTYFROMLOGIN @ IDLEJCPUPCPUWHAT Rootpts/2122.224.121.19409: 0313: 560.01s0.00stail-f/var/lo Rootpts/4122.224.121.

Add Netease 6.5 source to Centos 163

Recently, the system was found to be very slow, so we were preparing to change the domestic yum source. Prepare, first back up/etc/yum. repos. d/CentOS-Base.repoCd/etc/yum. repos. d/ Wgethttp: // mirrors.163.com/.help/CentOS6-Base-163.repo Change

CentOS closes SELINUX and opens ports 80 and 3306

Open ports 80 and 3306 Vim/etc/sysconfig/iptables Add the following code under the rule of port 22 by default (you can continue to add and modify the port number) #/sbin/iptables-I input-p tcp -- dport 80-j ACCEPT #/sbin/iptables-I INPUT-p tcp --

Total Pages: 5467 1 .... 5132 5133 5134 5135 5136 .... 5467 Go to: GO

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.