ubuntu - Bash Script to Check That Files Are Being Created - we have amazon ec2 instance upload output our security cameras. every , then, cameras have issue, stop uploaded, , need rebooted. easy way determine seeing if files not beingness created. problem creates lots , lots of files. if utilize find -ctime, takes long time script run. there faster way check see if files have been created since yesterday? need capture result, (yes there files, or not there not,) , email message, nice have didn't take half hr run. #!/bin/bash find /vol/security_ftp/west -ctime -1 find /vol/security_ftp/backentrance -ctime -1 find /vol/security_ftp/boardroomdoor -ctime -1 find /vol/security_ftp/mainentrance -ctime -1 find /vol/security_ftp/north -ctime -1 find /vol/security_ftp/south -ctime -1 using find natural solution, if must avoid it, can see newest file in directory using ls , sorting output according ctime, eg. ls /vol/security_ftp/west -clt | head --lines=1 ...
vim: Search & replace - i searching easy way search , replace things in vim "workaround" refactoring. on other stackoverflow-question found snippet of code: nnoremap gr gd:%s/<c-r>///gc<left><left><left> i thought gd selects current word under cursor in whole document , %s search , replaces matches after typed replace pattern. gc stands globally confirmation?! however: not work expected. illustration in python class of mine can easy rename occurencies of self in whole file not work on method identifieres or field identifieres length of one. def __init__(self): self.test = [] self.a = [] ... so self changed using snippet, doing gr on field a not work. how can work easy search , replace on 1 file? any tips on intelligent refactoring appreciated. after hours of searching found plugins , workarounds work c files, need @ to the lowest degree java, python , php compatibility. thanks every reply :) update: found...
Comments
Post a Comment