1. Find the /var directory owner is root, and all files belonging to the group mail
1 2
[root@www ~]# Find /var \\( -user root -a -group mail \\) -ls 132134 4 drwxrwxr-x 2 root mail 4096 September 12 13:55 /var/spool/mail
2. Find the /usr directory All files that are not root, bin, or hadoop
1 2
[root@www ~]# find /usr ! \\( -user root -o -user bin -o -user Hadoop \\) -exec ls -l {} \\; -rwsr-xr-x. 1 abrt abrt 10296 July 25 00:08 /usr/libexec/abrt-action-install-debuginfo-to-abrt-cache
3. Find all files whose contents have been modified in the /etc directory and whose owner is not root or hadoop
1 2
[ ,null,null,3],Root@www ~]# find /etc ! \\( -user root -o -user hadoop \\) -mtime -7 -exec ls -l {} \\; -rw-r--r--. 1 bash root 0 September 12 13:46 /etc/find_lab/find.txt
4. Find all files that have no owner or group on the current system and have been visited in the last week
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
[root@www ~]# find /-atime -7 -a \\( -nouser -o -nogroup \\) -ls 131305 0 -rw-rw---- 1 507 mail 0 September 12 13:55 /var/spool/mail/rainman find: “/proc/16541/task/16541/fd/5”: No such file or directory Find: “/proc/16541/task/16541/fdinfo/5”: No such file or directory find: “/proc/16541/fd/5”: No such file or directory find: “/proc/16541 /fdinfo/5”: No such file or directory 430089 4 -rwxr--r-- 1 507 abc 21 September 11 13:33 /lab/readme.txt 39 4 drwx------ 4 507 507 4096 9 Month 12 13:55 /home/rainman 40 4 -rw-r--r-- 1 507 507 18 July 24 02:55 /home/rainman/.bash_logout 41 4 drwxr-xr-x 2 507 507 4096 November 12 2010 /home/rainman/.gnome2 47 4 -rw-r--r-- 1 507 507 500 November 27 2014 /home/rainman/.emacs 46 4 -rw-r--r-- 1 507 507 176 Jul 24 02:55 /home/rainman/.bash_profile 45 4 -rw-r--r-- 1 507 507 124 July 24 02:55 /home/rainman/.bashrc 42 4 drwxr-xr-x 4 507 507 4096 August 17 19:31 /home/rainman/.mozilla 43 4 drwxr-xr-x 2 507 507 4096 August 18 2010 /home/rainman/.mozilla/plugins 44 4 drwxr-xr-x 2 507 507 4096 August 18 2010 /home/rainman/.mozilla/extensions
5. Find /etc All files larger than 20K and of type common file
1 2 3 4 5 6 7 8 9 10 11
[root@www ~]# find /etc -type f -size +20k -exec ls -l {} \\; |
Head -n 10 -rw-r--r--. 1 root root 27223 November 12 2010 /etc/sound/events/gnome-2.soundlist -rw-r--r--. 1 root root 34419 March 4 2015 /etc/httpd/conf/httpd.conf -rw-r--r--. 1 root root 21214 June 16 2014 /etc/dnsmasq.conf -rw-r--r--. 1 root root 23173 November 21 2014 /etc/gimp/2.0/gimprc -rw-r--r--. 1 root root 29853 April 10 00:44 /etc/sysconfig/network-scripts/network-functions-ipv6 -rw-r --r--. 1 root root 45016 November 11 2010 /etc/gconf/schemas/compiz-decoration.schemas -rw-r--r--. 1 root root 49322 November 11 2010 /etc/gconf/schemas /compiz-wall.schemas -rw-r--r--. 1 root root 148031 November 11 2010 /etc/gconf/schemas/gok.schemas -rw-r--r--. 1 root root 31365 November 11 2010 /etc/gconf/schemas/gedit.schemas -rw-r--r--. 1 root root 32382 March 14 2012 /etc/gconf/schemas/gweather.schemas
As a network operation and maintenance engineer, if you manage more routing and switching d
How to view the routing table information in the Linux host, the command is route. For a sim
Well, I’ve been internships in Netease games lately, so it seems that I haven’t come up to
This article address: http://www.cnblogs.com/archimedes/p/bash-shell1.html, please indicate the sour
Use yum to install the scheduled task function. The result is prompted:
Copy the code
The code is as follows:
# yum -y install vixie-cron
Loaded plugins: fastestmirror, refresh-pa
Grep yum root 6744 0.0 0.0 103260 900 pts/1 S+ 14:59 0:00 grep yum root 25960 0.0 0.0 0 0 ? Z Sep19
Ubuntu10.10 installed arm version of Qt encountered error: thread-local storage no
Dynamic routing network infrastructure of linux
Linux how to view the size of the hard disk
Linux user and user group management
Ubuntu LAN uses client networking
Linux user and user group settings
How to configure Chinese input method in Linux environment
Learn about Windows XP system contraindications to avoid system crashes
CentOS yum command Using tutorials
How to get the network share of Windows7 and vista
Windows 2008 R2 Unknown error (0x800f0818) solution when installing sp1 patch
Win10 Build 10061 Known bugs and solutions summary
Where is the Win7 firewall? Where is the Win7 firewall set up?
Win9 Preview Exposures More Virtual Desktops and Charm Bar Details
IIS7 date display format solution
Skype version 11.10.147 fixes crash in Win10 preview version