Archive for the tag 'file'

SBDavid

MySQL Error Log File

MySQL Error Log File

The error log contains information indicating when mysqld was started and stopped and also any critical errors that occur while the server is running.

If mysqld notices a table that needs to be automatically checked or repaired, it writes a message to the error log.
On some operating systems, the error log contains a stack trace if mysqld dies.

You can specify where mysqld writes the error log with the –log-error[=file_name] option.
If no file_name value is given, mysqld uses the name host_name.err by default and writes the file in the data directory.

On Windows, error output is always written to the .err file if –console is not given.

If you use mysqld_safe to start mysqld, mysqld_safe arranges for mysqld to write error messages to a log file or to syslog mysqld_safe has three error-logging options, –syslog, –skip-syslog, and –log-error.

SBDavid

Splitting a file in GNU/Linux

Splitting a file in GNU/Linux

If you want to split a file “myvideo” with size 9.6 Mb( 10000000 b) into two, then the command to do the same is:

$ split -b 5000000 myvideo

File “myvideo” is now split into two files “xaa” and “xab” by default and these two files will be having the size 5000000 b. Reducing file size will lead to more number of new files generated. You can also specify the output filename. Suppose you want to use output file name as “video”, then the following command will help you:

$ split -b 5000000 example myvideo

Now how to join the splitted files? You can use the cat command to join the splitted files. For example if the new files generated by split are “xaa”, “xab” and “xac”, use the following command to join the splitted files.

$ cat xa* > filename

« Prev