i'm new at UNIX, and i;ve wonderd - can i write an alias that will show me only files from today? (not directories) ls -somthing, or some script that works with date...
Quick and crude.
Assumes no files older than one year.
Assumes that your "ls -la" output has the date as "Mmm dD"
Note the extra space character for days 1-9 .
Only clever thing in the "date" command is the double quotes which we use to preserve space characters and the %e which gives the day of the month with leading space for single digit day of month.
The "grep" is looking for lines in the "ls -la" output which start with a hyphen character (i.e. Only files).
Note: This is not a commercial solution because it cannot distinguish this year and older years. The commercial approach would use "touch" to create a reference file timestamped at the start of the day, then find files relative to that reference file.
Hai all
i want to grep the particular pattern and move the mathing records to torget file and delete the matching recodrs from source file.
patterns are position based, like
13413432,aaaaaaa,dsfdddddd,34234324,22224555
13413432,aaaaaaa,dsfdddddd,12234324,11222455
i want to move the... (1 Reply)