Skip to main content
Avoid "<...>"-style placeholders in commands involving redirection
Source Link
AdminBee
  • 23.6k
  • 25
  • 56
  • 78

If for some reason you must read the block device using a block size of 16K:

  
dd if=/mnt/nfs bs=16k | pv -L <rate>rate >> /dev/sda 

Where <rate>rate is the maximum allowed amount of bytes per second to be transferred, or the maximum allowed amount of kibibytes, mibibytes, gibibytes, [...] per second to be transferred if KK, MM, GG, [...] is specified.

However if you don't really have to read the file using a block size of 16K, just use pv, which can read block devices:

  
pv -L <rate>rate /mnt/nfs >> /dev/sda  

If for some reason you must read the block device using a block size of 16K:

 
dd if=/mnt/nfs bs=16k | pv -L <rate> > /dev/sda 

Where <rate> is the maximum allowed amount of bytes per second to be transferred, or the maximum allowed amount of kibibytes, mibibytes, gibibytes, [...] per second to be transferred if K, M, G, [...] is specified.

However if you don't really have to read the file using a block size of 16K, just use pv, which can read block devices:

 
pv -L <rate> /mnt/nfs > /dev/sda  

If for some reason you must read the block device using a block size of 16K:

 
dd if=/mnt/nfs bs=16k | pv -L rate > /dev/sda 

Where rate is the maximum allowed amount of bytes per second to be transferred, or the maximum allowed amount of kibibytes, mibibytes, gibibytes, [...] per second to be transferred if K, M, G, [...] is specified.

However if you don't really have to read the file using a block size of 16K, just use pv, which can read block devices:

 
pv -L rate /mnt/nfs > /dev/sda
deleted 280 characters in body
Source Link
kos
  • 4.3k
  • 1
  • 15
  • 28

First of all, you're probably specifying the target directory instead of the target file; the of= option of dd expects a path to the target file, so make sure you're specifying a path to a (non existing) target file:

dd if=/dev/sda of=/mnt/nfs/file bs=16k 

If for some reason you must read the block device using a block size of 16K:

dd if=/devmnt/sdanfs bs=16k | pv -L <rate> > /mnt/nfsdev/filesda 

Where <rate> is the maximum allowed amount of bytes per second to be transferred, or the maximum allowed amount of kibibytes, mibibytes, gibibytes, [...] per second to be transferred if K, M, G, [...] is specified.

However if you don't really have to read the file using a block size of 16K, just use pv, which can read block devices:

pv -L <rate> /devmnt/sdanfs > /mnt/nfsdev/filesda 

First of all, you're probably specifying the target directory instead of the target file; the of= option of dd expects a path to the target file, so make sure you're specifying a path to a (non existing) target file:

dd if=/dev/sda of=/mnt/nfs/file bs=16k 

If for some reason you must read the block device using a block size of 16K:

dd if=/dev/sda bs=16k | pv -L <rate> > /mnt/nfs/file 

Where <rate> is the maximum allowed amount of bytes per second to be transferred, or the maximum allowed amount of kibibytes, mibibytes, gibibytes, [...] per second to be transferred if K, M, G, [...] is specified.

However if you don't really have to read the file using a block size of 16K, just use pv, which can read block devices:

pv -L <rate> /dev/sda > /mnt/nfs/file 

If for some reason you must read the block device using a block size of 16K:

dd if=/mnt/nfs bs=16k | pv -L <rate> > /dev/sda 

Where <rate> is the maximum allowed amount of bytes per second to be transferred, or the maximum allowed amount of kibibytes, mibibytes, gibibytes, [...] per second to be transferred if K, M, G, [...] is specified.

However if you don't really have to read the file using a block size of 16K, just use pv, which can read block devices:

pv -L <rate> /mnt/nfs > /dev/sda 
Source Link
kos
  • 4.3k
  • 1
  • 15
  • 28

First of all, you're probably specifying the target directory instead of the target file; the of= option of dd expects a path to the target file, so make sure you're specifying a path to a (non existing) target file:

dd if=/dev/sda of=/mnt/nfs/file bs=16k 

If for some reason you must read the block device using a block size of 16K:

dd if=/dev/sda bs=16k | pv -L <rate> > /mnt/nfs/file 

Where <rate> is the maximum allowed amount of bytes per second to be transferred, or the maximum allowed amount of kibibytes, mibibytes, gibibytes, [...] per second to be transferred if K, M, G, [...] is specified.

However if you don't really have to read the file using a block size of 16K, just use pv, which can read block devices:

pv -L <rate> /dev/sda > /mnt/nfs/file