Skip to main content

Posts

Showing posts from November, 2012

Useful commands and howtos at your finger tips

Useful commands and howtos at your finger tips linux | unix | dos | windows | mac jdk | regex |... 1. How to find files and operate some command on that file list Example (a) Find all files updated within the last 11 minutes, and copy them to another directory: find . -mmin 11 -exec cp '{}' /home/temp/ \; 2. How to read a file line by line through a unix/linux shell script http://www.bashguru.com/2010/05/how-to-read-file-line-by-line-in-shell.html 3. How to extract only the file names after you have figured out which files from the ls -ltr listing Assume filelist.txt contains the ls- ltr output redirected cat filelist.lst -rw-r-----  1 oraxxxx emsxxxx     2119 Dec  5 02:50 sid_ora_5565.trc -rw-r-----  1 oraxxxx emsxxxx    11591 Dec  5 02:50 sid_ora_24464_TEST.trm -rw-r-----  1 oraxxxx emsxxxx   469796 Dec  5 02:50 sid_ora_5565_TEST.trc -rw-r-----  1 oraxxxx emsxxxx ...