On 19/02/19 11:46, Peng Yu wrote: > Hi, I don't see a way to specify "END" in dd. I don't want to count > the length a file in another command. Is there a way to let dd dump > from a given location to the end? Thanks.
There is no way at present, without first determining the size and seeking relative to that. dd seek=$calculated_size oflag=seek_bytes ... If you wanted to replace the end of a file in place, and if atomicity isn't a concern (which it couldn't be if the size was big enough), one might combine truncate like: truncate -s -$size file dd conv=notrunc oflag=oappend ... If you just wanted to read the last portion of a file, one could use tail (which also supports devices since v8.29) like: tail -c$size ... cheers, Pádraig
