• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

write

Display Sequential Write Throughput

February 5, 2020

Here’s a dd command to display sequential write throughput from the command line.

time dd if=/dev/zero of=/mounted_backup_volume/zero.raw bs=1M count=512 status=progress

time dd if=/dev/zero of=/mounted_backup_volume/zero.raw bs=1M count=512 status=progress

Output is.

512+0 records in
512+0 records out
536870912 bytes (537 MB) copied, 0.667813 s, 804 MB/s
 
real    0m0.669s
user    0m0.000s
sys     0m0.359s

512+0 records in 512+0 records out 536870912 bytes (537 MB) copied, 0.667813 s, 804 MB/s real 0m0.669s user 0m0.000s sys 0m0.359s

Filed Under: Linux Tagged With: dd, display, sequential, terminal, throughput, write

Set Immutable Attribute

November 27, 2019

If you don’t want a file edited or deleted, you can set the immutable attribute to ON. If activated, not even root or the owner of the file can delete it. Users with write access can still read it, but they obviously will not be able to modify it. To unset it, just use the -i option.

# Set immutable attribute
sudo chattr +i text.txt
 
# Unset immutable attribute
sudo chattr -i text.txt

# Set immutable attribute sudo chattr +i text.txt # Unset immutable attribute sudo chattr -i text.txt

Filed Under: Linux Tagged With: attribute, delete, immutable, read, root, write

Crontab File

June 12, 2019

How to load crontab from file.

crontab /path/to/file.txt

crontab /path/to/file.txt

Save crontab to a file.

crontab -l > /path/to/file.txt

crontab -l > /path/to/file.txt

Filed Under: Linux Tagged With: crontab, file, load, write

  • Home
  • About
  • Archives

Copyright © 2023