Install the software under Fedora:
# yum install ImageMagick
Convert an image from one format to another. In this case jpeg.$ convert *.png *.jpg
$ mogrify -format png *.jpg
Read more about this software here.
tutorials, tips, tricks, commands, programming, linux, windows, database, sql, python, programming language, Fedora, drawing, painting, tutorial, tutorials
# yum install ImageMagick
Convert an image from one format to another. In this case jpeg.$ convert *.png *.jpg
$ mogrify -format png *.jpg
Read more about this software here.
$ sudo yum install pv
You can read the man file to get more help:man pv
The result is:NAME
pv - monitor the progress of data through a pipe
SYNOPSIS
pv [OPTION] [FILE]...
pv [-h|-V]
DESCRIPTION
pv allows a user to see the progress of data through a pipeline, by
giving information such as time elapsed, percentage completed (with
progress bar), current throughput rate, total data transferred, and
ETA.
To use it, insert it in a pipeline between two processes, with the
appropriate options. Its standard input will be passed through to its
standard output and progress will be shown on standard error.
Let's see some examples.$ pv voronoi.py | python
737B 0:00:00 [86.9kB/s] [==================================>] 100%
You can see how fast the computer reads from /dev/zero.$ pv /dev/zero > /dev/null
1.1GB 0:00:05 [ 2GB/s] [ <=> ]
You can use the dialog to show a progress bar.$ (pv -n /dev/zero > /dev/null) 2>&1 | dialog --gauge "Please wait" 10 70 0
#insmod kernelmoduletest.ko
Next, test the kernel module messages.#dmesg | tail
Also, you need to remove the kernel module.$ rmmod kernelmoduletest
ERROR: Removing 'kernelmoduletest': Operation not permitted
This means you need to have superuser rights. So use the sudo or su command.#include
#include
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("kernelmoduletest");
MODULE_AUTHOR("Catalin George Festila/mythcat/catafest");
int init_module() {
printk(KERN_INFO "Now I will initialize my kernel module\n");
printk(KERN_INFO "Test: Hello World !\n");
return 0;
}
void cleanup_module() {
printk(KERN_INFO "Bad!... kernel module unloaded.\n");
}
Make a new file named Makefile.obj-m += kernelmoduletest.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
Compile your kernel module# make
...
Building modules, stage 2.
MODPOST 1 modules
...
make[1]: Leaving directory `/usr/src/linux-headers-2.6.31-14-generic'
If you test your module using the commands from the top of this tutorial, you can see that:
[14694.779227] Now I will initialize my kernel module
[14694.779233] Test: Hello World !
[15049.825605] Bad!... kernel module unloaded.
If you have already made kernel modules and the subject it's interesting for you, send me an email.while [ 1 ]; do cat /proc/meminfo; date; echo; sleep 1; done
Make this script executable and name it: meminfo.$ watch -d ./meminfo
This simple method can be applied to other files ...
nc -l -p 7000
See the next image:nc xxx.xxx.xxx.xxx 7000
If you type something in your terminal you will see on a tablet.You can execute copies a large block of data to and from disk.
This will minimize disk caching.
Next is one example if our test system has 1GB of RAM.
It is easy ( 1GB = 250,000 blocks ).
$ time sh -c "dd if=/dev/zero of=bigfile bs=8k count=250000 && sync"
250000+0 records in
250000+0 records out
2048000000 bytes (2.0 GB) copied, 37.0113 s, 55.3 MB/s
real 0m40.910s
user 0m0.172s
sys 0m12.641s
It's very hard to argue with this dd test.
uvcvideo: Found UVC 1.00 device USB2.0 Camera
mplayer tv:// driver=v4l2:width=640:height=480:device=/dev/video0 -vo null
mplayer tv:// -frames 10 -tv fps=20:driver=v4l2:width=640:height=480:device=/dev/video0 -vo jpeg