help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wait until the file is done


From: Mike Jonkmans
Subject: Re: wait until the file is done
Date: Fri, 30 Oct 2020 18:20:16 +0100

On Fri, Oct 30, 2020 at 12:52:11PM -0400, Greg Wooledge wrote:
> 
> size=$(wc -c < "$file")

It may be better to use: wc -c "%file"
As 'wc' can use the file size (via fstat).

The '<' forces wc to read the file content.
Which can be significantly slower for large (video) files.


Regards, Mike Jonkmans

-- 
Mike Jonkmans <bashbug@jonkmans.nl>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]