Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Linux filtration empty file command summary     - The most concise Systemd tutorial, just ten minutes (Linux)

- Eclipse-4.4 crash problem solving under Debian-7.6 (Linux)

- Common Linux System Troubleshooting (Linux)

- Use OpenSSL to generate a certificate (Linux)

- DB2 table space is redirected to restore the database combat (Database)

- Customize own small private Linux system (Linux)

- How to configure Proftpd server on Fedora 22 (Server)

- GAMIT10.5 install and update failed Solution (Linux)

- VMware virtual machines to install virt-manager unable to connect to libvirt's approach (Linux)

- Fedora 20 Installation and Configuration (Linux)

- Linux host dual LAN transceiver package ARP problem (Linux)

- Let Linux operating system more secure (Linux)

- C ++ 11 smart pointers (Programming)

- Error: Unable to establish connection with FTP SFTP server (Server)

- Compression software on a simple comparison of zip and gz (Linux)

- Sniffer Linux Environment (Linux)

- How to troubleshoot error java.lang.NoSuchMethodError (Programming)

- In-depth summary of the PHP core of object-oriented (Programming)

- Import and export myloader accelerate mydumper (Database)

- Notebook computer forget password solution (Linux)

 
         
  Linux filtration empty file command summary
     
  Add Date : 2017-12-01      
         
         
         
  There are often done in Linux file operations, and today a colleague in a production environment statistics, found that many log files are empty, too many documents, he wanted to look at what file is not empty.

But also do not want to use the script, I wanted to use a command to get really a lazy person enough. Simple simulation under. I want to see e.lst because its size is not empty.
 

DUM1102 / oravl01 / Oracle> ll * .lst
 -rw-r - r-- 1 oracle dba 0 Jul 21 15:39 a.lst
 -rw-r - r-- 1 oracle dba 0 Jul 21 15:39 b.lst
 -rw-r - r-- 1 oracle dba 0 Jul 21 15:39 c.lst
 -rw-r - r-- 1 oracle dba 0 Jul 21 15:39 d.lst
 -rw-r - r-- 1 oracle dba 7 Jul 21 15:39 e.lst
 
The most streamlined command is to use the grep.
 DUM1102 / oravl01 / oracle> ll * .lst | grep -v "0"
 -rw-r - r-- 1 oracle dba 7 Jul 21 15:39 e.lst
 
Of course, you can also use awk to complete.
 Difficulty and then look to upgrade, add a file f.lst now the file structure is as follows:
 DUM1102 / oravl01 / oracle> ll * .lst
 -rw-r - r-- 1 oracle dba 0 Jul 21 15:39 a.lst
 -rw-r - r-- 1 oracle dba 0 Jul 21 15:39 b.lst
 -rw-r - r-- 1 oracle dba 0 Jul 21 15:39 c.lst
 -rw-r - r-- 1 oracle dba 0 Jul 21 15:39 d.lst
 -rw-r - r-- 1 oracle dba 7 Jul 21 15:39 e.lst
 -rw-r - r-- 1 oracle dba 14 Jul 21 16:35 f.lst
 
Now he wants to see the size of 7-byte file, use awk to small chopper pilot.
 ll * .lst | awk -v file_size = 7 '{if ($ 5 == file_size) print $ 5 "" $ 9}'
 DUM1102 / oravl01 / oracle> ll * .lst | awk -v file_size = 7 '{if ($ 5 == file_size) print $ 5 "" $ 9}'
 7 e.lst
     
         
         
         
  More:      
 
- MySQL Study of --Percona Server 5.5 Upgrade 5.6 (Database)
- Linux firewall iptables beginner tutorial (Linux)
- Get basic information about Linux server script (Server)
- C ++, overloading, cover, hide (Programming)
- Json Applications of FastJson (Programming)
- Java Class file format parsing (Programming)
- grep command usage (Linux)
- Save the database data files into Oracle Learning (Database)
- Log4j configuration file Explanation (Linux)
- Debian 8 (amd64) installation deployment Memcached management tools MemAdmin (Server)
- How open source code libraries hosted on Github (Linux)
- Java garbage collection (Programming)
- Linux use glibc2 library and crypt () function to generate the user password (Programming)
- To install Xen in Ubuntu 12.04 (Linux)
- mysqldump issue a note (Database)
- Linux installation is larger than 2TB (UEFI interface) hard disk solution (Linux)
- Spring Data MongoDB combat (Database)
- Oracle delete table space prompted ORA-00604 and ORA-38301 (Database)
- iOS9 new feature - stacked view UIStackView (Programming)
- Apple Mac computer to install Windows 10 Concise Guide (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.