Hi all ,
I need to print the filesizes and files in my home directory which are greater than 1 Mb . preferably both the filesizes and the file path
i tried
du -h ~ | awk '{print $1}' | grep M
It gives me just the first column , but i got all the indicator containing M as suffix , indicating they are greater than a MB .
then i tried
du -h | awk '{print $1 , $2}' | grep M
But it grep's all the file names which contains the letter 'm' in it and the out put contains files like .
[
68K ./Equitywatch/HTMLs/Appa
92K ./Equitywatch/HTMLs/Ramesh
]
all I need is like , it should grep the 'M's from the first column , and also prints out both first and second column .
Like
[
14M ./.thunderbird/vtqnx8nq.default/ImapMail/mailhost
14M ./.thunderbird/vtqnx8nq.default/ImapMail
]
for the entire home directory
can some one helps me out framing the arguments so that the out willbe like the one above