Find command related to mtime: find $HOME -mtime 0 Search for files in your home directory which have been modified in the last twenty-four hours. This command works this way because the time since each file was last modified is divided by 24 hours and any remainder is discarded. That means that to match -mtime 0, a file will have to have a modification in the past which is less than 24 hours ago 2014-04-09 10:00:00 (time difference / 24 and any remainder is discarded) find -mtime 0 time is from 2014-04-08 10:00:00 (not included) to 2014-04-09 10:00:00(included) find -mtime 1 time is from 2014-04-07 10:00:00 (not included) to 2014-04-08 10:00:00 (included) find -mtime +0 time is before 2014-04-08 10:00:00(included) find -mtime +1 time is before 2014-04-07 10:00:00(included) find -mtime -1 time is after 2014-04-07 10:00:00 (not included) ps -caefL | grep RT <======get all thread info including running level ls /etc/localtime <===check local time configuration, the os log use this time zone ln -s /usr/share/zoneinfo/PST&PDT /etc/localtime <==change to PST&PDTtop -Hb -n 1 -p<==top command to show every thread sed -n '1,2p' 1.txt <===choose 1 to 2 line to print sed -i '1,2d' 1.txt <===delete the 1 to 2 line in 1.txt A=$(sed -n '$=' /tmp/1.txt) <===count the line number of the file sed -i $(($A-n+1)),${A}d /tmp/1.txt <===delete from the end split -l line_number /tmp/1.txt <===split a big file to a lot of small files, however, keep the original file <===If the file is really huge, use hadoop is a good idea
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26611303/viewspace-1138267/ ,如需转载,请注明出处,否则将追究法律责任。