How to create a dummy file with a given size in Linux?
Answer:
Use the dd command
Example:
dd if=/dev/zero of=test.txt bs=1 count=1MB
The above command will create a 1MB dummy file and stored as test.txt
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
How to create a dummy file with a given size in Linux?
Answer:
Use the dd command
Example:
dd if=/dev/zero of=test.txt bs=1 count=1MB
The above command will create a 1MB dummy file and stored as test.txt
How to restart a frozen Linux System?
Answer:
Try the following two simple methods first:
If still not work, do the following:
How to kill a running process by command?
Answer:
For example, if Firefox hang, in the command prompt, just type in
pkill firefox
How to run multiple commands at once in Linux?
Answer:
You can separate the commands by a semicolon ;
e.g.
cat foo.txt; cat bar.txt
Two commands will be executed one by one.
However, if you want to execute a command if and only if previous command is executed successfully, then you can use && to separate them
e.g.
make && make install
So if make failed, make install will not be executed.
How to flush DNS cache in Linux
Answer:
If nscd was installed, simply restart it.
/etc/init.d/nscd restart