How do I find the MySQL my.cnf location

There is no internal MySQL command to trace this, it’s a little too abstract. The file might be in 5 (or more?) locations, and they would all be valid because they load cascading. /etc/my.cnf /etc/mysql/my.cnf $MYSQL_HOME/my.cnf [datadir]/my.cnf ~/.my.cnf Those are the default locations MySQL looks at. If it finds more than one, it will load … Read more

Post request with Wget?

Wget currently doesn’t not support “multipart/form-data” data. –post-file is not for transmitting files as form attachments, it expects data with the form: key=value&otherkey=example. It is actually possible to post other formats (json) if you send the corresponding header. –post-data and –post-file work the same way: the only difference is that –post-data allows you to specify … Read more

What is the difference between xterm-color & xterm-256color?

xterm-256color describes Xterm with support for 256 colors enabled. xterm-color describes an older branch of Xterm that supports eight colors. xterm-color is not recommended, since it describes a variant of Xterm that’s less functional and that you’re not likely to be using. Usually you’ll want to use xterm, xterm-16color or xterm-256color. In particular, xterm-256color is the default for Terminal starting with Mac OS X 10.7 Lion, … Read more

Can you Run Xcode in Linux?

The low-level toolchain for Xcode (the gcc compiler family, the gdb debugger, etc.) is all open source and common to Unix and Linux platforms. But the IDE–the editor, project management, indexing, navigation, build system, graphical debugger, visual data modeling, SCM system, refactoring, project snapshots, etc.–is a Mac OS X Cocoa application, and is not portable.

Command to change the default home directory of a user

Ibrahim’s comment on the other answer is the correct way to alter an existing user’s home directory. Change the user’s home directory: usermod is the command to edit an existing user.-d (abbreviation for –home) will change the user’s home directory. Change the user’s home directory + Move the contents of the user’s current directory: -m (abbreviation for –move-home) will move … Read more

Compile the Fortran program in Windows using gfortran

To compile Fortran code for Windows you need a Fortran compiler for Windows. Microsoft neither provides a built-in one nor offers one for sale. Third-party compilers are available, including gfortran, but you’ll need to install one yourself. If you want to use gfortran in particular, or if you like it simply because you don’t have to spend money … Read more

What does `set -x` do?

set -x enables a mode of the shell where all executed commands are printed to the terminal. In your case it’s clearly used for debugging, which is a typical use case for set -x: printing every command as it is executed may help you to visualize the control flow of the script if it is not functioning … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)