Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

string to integer conversion

Status
Not open for further replies.

fisa123

Programmer
Nov 28, 2003
1
US
I have a small problem here. I want to take the size of a file from the output of "ll -rt" command and compare if it is less than 1kb.How do i convert the file size returned by ll -rt into an integer so that i can do the comparison? please shed some light........Thanks in advance
 
Print files with size less than 1k ...

ll -rt | awk '$5 < 1024'
 
Another way to find small files:
Code:
find /path/to/dir -type f -size -1024c

Hope This Help
PH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top