[Linux] Linux大文件查找和清空

Linux 查看大文件和快速清空大文件 df 查看磁盘空间使用情况 Filesystem Size Used Avail Capacity iused ifree %iused Mounted on /dev/disk1s1 113Gi 90Gi 19Gi 83% 2074500 9223372036852701307 0% / devfs 201Ki 201Ki 0Bi 100% 696 0 100% /dev /dev/disk1s4 113Gi 3.0Gi 19Gi 14% 3 9223372036854775804 0% /private/var/vm map -hosts 0Bi 0Bi 0Bi 100% 0 0

[Linux] Linux Commands In Structured Order with Detailed Reference

Linux Commands In Structured Order with Detailed Reference SYSTEM $ uname –a => Display linux system information $ uname –r => Display kernel release information (refer uname command in detail) $ cat /etc/redhat_release => Show which version of redhat installed $ uptime => Show how long system running + load (learn uptime command) $ hostname => Show system host name $ hostname -i => Display the IP address of the host (all options hostname) $ last reboot => Show system reboot history (more examples last command) $ date => Show the current date and time (options of date command) $ cal => Show this month calendar (what more in cal) $ w => Display who is online (learn more about w command) $ whoami => Who you are logged in as (example + sreenshots) $ finger user => Display information about user (many options of finger command) HARDWARE $ dmesg => Detected hardware and boot messages (dmesg many more options) $ cat /proc/cpuinfo => CPU model $ cat /proc/meminfo => Hardware memory $ cat /proc/interrupts => Lists the number of interrupts per CPU per I/O device $ lshw => Displays information on hardware configuration of the system $ lsblk => Displays block device related information in Linux (sudo yum install util-linux-ng) $ free -m => Used and free memory (-m for MB) (free command in detail) $ lspci -tv => Show PCI devices (very useful to find vendor ids) $ lsusb -tv => Show USB devices (read more lsusb options) $ lshal => Show a list of all devices with their properties $ dmidecode => Show hardware info from the BIOS (vendor details) $ hdparm -i /dev/sda => Show info about disk sda $ hdparm -tT /dev/sda => Do a read speed test on disk sda $ badblocks -s /dev/sda => Test for unreadable blocks on disk sda STATISTICS $ top => Display and update the top cpu processes (30 example options) $ mpstat 1 => Display processors related statistics (learn mpstat command) $ vmstat 2 => Display virtual memory statistics (very useful performance tool) $ iostat 2 => Display I/O statistics (2sec Intervals) (more examples) $ tail -n 500 /var/log/messages => Last 10 kernel/syslog messages (everyday use tail options) $ tcpdump -i eth1 => Capture all packets flows on interface eth1 (useful to sort network issue) $ tcpdump -i eth0 'port 80' => Monitor all traffic on port 80 ( HTTP ) $ lsof => List all open files belonging to all active processes.

[Linux] 常用日志文件和系统命令

Linux 常用日志文件和系统命令 日志文件说明 /var/log/message 系统启动后的信息和错误日志,是Red Hat Linux中最常用的日志之一 /var/log/secure 与安全相关的日志信息 /var/log/maillog 与邮件相关的

[Linux] iptables常用示例

Linux iptables常用示例 iptables简介 iptables是 Linux 内核集成的 IP 信息包过滤系统,用于对数据包的过滤和转发。 iptables的规