Tag Archives: unix
Vim / Vi: Save File Without Root Permissions
Objective: You open a file for editing on vi
but you do not have write permissions for that file. You make changes and when you try to save changes, you get the infamous error “E212: Can’t open file for writing” from vim / vi editor. You realise that you forgot to execute vi
with sudo
. How do you save the file without creating a temporary file?
Unix / Linux: Print IO Statistics of Running dd Process
Let’s say you have a dd
process that is running. By default, dd
will only print IO statistics once the job has been completed or if it is interrupted by a Ctrl-C (SIGINT) command. While the job is running, you will probably have no idea how much data has been copied, the current progress or the copying speed. But fret not, there is actually a way to get the IO statistics of a running dd
process.