Hello friends. Today we'll face with new programming pattern. This is decorator. It is wrapper around your function. Frankly speaking, there are a lot of infromation about decorators in python and I'll not explain how it works. Please find great explanation of decorators in useful links. There are two links, one to stackoverflow and second one is habrahabr russian variant.
I thought that it would be nice if I'll create some nice decorator from real life. So... let's create files, let's say with 200 Mb size, in three different file system (ext4, ext4 without journaling and btrfs) and check time of execution of file creation process. I'll do it on my Vbo...
There could be situations when you should copy files or block device to another system via network. There are a few methods to do it.
1. Copy files with ssh:
scp -r /home/user/testdir /etc/init.d/my_init_file email@example.com:
-r means recursively copy directories
First part of command is what exactly we copy (files and dirs), second is where we copy. Two points after ip address means that we want to copy to home dir of user.
2. Copy block device with netcat:
on server where copy:
nc -l -p 5555 | dd of=/dev/sdc
Firstly, execute this command on remote machine that netcat open socket and listen. -l opt...
Like many Linux command line tools, dd operates silently unless something unexpected happens. Its lack of visual progress feedback is a nice feature for scripting. However, it can leave you wondering about its progress if you are interactively dd-copying a large disk.
To illustrate, you run the following (valid, but perhaps not very useful) dd copy:
$ dd if=/dev/zero of=/dev/null bs=1K count=100
To get a progress report while dd is running, you need to open another virtual terminal, and then send a special USR1 signal to the dd process.
First, find out the process id of the dd process by running the following in the new...