Cli favourites: Difference between revisions
Jump to navigation
Jump to search
Created page with "==find large files== find /home/iwiseman -size 10M ==gawk usage== This nicely removes the total line in ls and prints the filename ls -l | sed /^total/d |gawk {'print $..." |
No edit summary |
||
Line 12: | Line 12: | ||
sed -i -e 's/fff/ddd/g' iain.txt | sed -i -e 's/fff/ddd/g' iain.txt | ||
==print list of filenames using awk== | |||
ls -l |gawk -F \ {'print $9,$5'} |
Revision as of 02:35, 23 February 2018
find large files
find /home/iwiseman -size 10M
gawk usage
This nicely removes the total line in ls and prints the filename
ls -l | sed /^total/d |gawk {'print $9'}
sed search and replace
Replace text in file
sed -i -e 's/fff/ddd/g' iain.txt
print list of filenames using awk
ls -l |gawk -F \ {'print $9,$5'}