Skip to main content

Posts

Featured

Unix find command tips

actually there are many things can be done by using find command in unix/linux. in example, we want to find something inside /test folder we use find /test -name *something* -name option is the key word to find something with the name. we also can find something by time, find /test -mtime -1 the -mtime option is use to detect file modified date, -1 mean older than, +1 mean later than. you can put any day, but please use it carefully, because +1 not mean 1 days, it mean 48 hours, 0 was include. keep testing to get best result. the find command cannot find file which create by specific date or hour. so we use trick to make it find file like created last 2 hours. first we need to create a file with certain time stamp by using touch command touch -t YYMMDDHHMM filename  let say we want to find files that create last 3 hours. the date time now is 201711160900, so we touch a timer file with time stamp 201711160600. find /test -newer timer by comparing file time stamp,

Latest Posts