Tag: c

52 votes
15 answers
1.5K views
How do I see what character set a MySQL database / table / column is?

What is the (default) charset for: MySQL database MySQL table MySQL column

avatar
Keith
0 1 0 9
asked 07 September, 2021
58 votes
4 answers
2.5K views
SQL injection that gets around mysql_real_escape_string()

Is there an SQL injection possibility even when using mysql_real_escape_string() function? Consider this samp

avatar
Don
0 1 0 9
asked 07 September, 2021
60 votes
13 answers
2.5K views
How to truncate a foreign key constrained table?

Why doesn't a TRUNCATE on mygroup work? Even though I have ON DELETE CASCADE SET I get: ERROR 1701 (4

avatar
Hilario
0 1 0 9
asked 07 September, 2021
47 votes
8 answers
1.3K views
MySQL: Large VARCHAR vs. TEXT?

I've got a messages table in MySQL which records messages between users. Apart from the typical ids and m

avatar
Rudolf
0 1 0 9
asked 07 September, 2021
58 votes
11 answers
1.8K views
How can I find all the tables in MySQL with specific column names in them?

I have 2-3 different column names that I want to look up in the entire database and list out all tables which

avatar
Yolando
0 1 0 9
asked 07 September, 2021
54 votes
14 answers
2.1K views
How do I specify unique constraint for multiple columns in MySQL?

I have a table: table votes ( id, user, email, address, primary key(id), ); Now I want

avatar
Leonardo
0 1 0 9
asked 07 September, 2021
58 votes
20 answers
477 views
MySQL error code: 1175 during UPDATE in MySQL Workbench

I'm trying to update the column visited to give it the value 1. I use MySQL workbench, and I'm writi

avatar
Shanita
0 1 0 9
asked 07 September, 2021
55 votes
8 answers
2.4K views
What's the difference between utf8_general_ci and utf8_unicode_ci?

Between utf8_general_ci and utf8_unicode_ci, are there any differences in terms of performance?

avatar
Adolfo
0 1 0 9
asked 07 September, 2021
50 votes
30 answers
1.4K views
How can I output MySQL query results in CSV format?

Is there an easy way to run a MySQL query from the Linux command line and output the results in CSV format? He

avatar
Joseph
0 1 0 9
asked 07 September, 2021
54 votes
15 answers
1.7K views
How can I get a list of user accounts using the command line in MySQL?

I'm using the MySQL command-line utility and can navigate through a database. Now I need to see a list of

avatar
Patsy
0 1 0 9
asked 07 September, 2021
60 votes
29 answers
1.5K views
Argument list too long error for rm, cp, mv commands

I have several hundred PDFs under a directory in UNIX. The names of the PDFs are really long (approx. 60 chars

avatar
Frederick
0 1 0 9
asked 07 September, 2021
65 votes
2 answers
2.2K views
How do SO_REUSEADDR and SO_REUSEPORT differ?

The man pages and programmer documentations for the socket options SO_REUSEADDR and SO_REUSEPORT are different

avatar
Thurman
0 1 0 9
asked 07 September, 2021
55 votes
16 answers
1.7K views
How to force cp to overwrite without confirmation

I'm trying to use the cp command and force an overwrite. I have tried cp -rf /foo/* /bar, but I am still

avatar
Dwain
0 1 0 9
asked 07 September, 2021
68 votes
9 answers
1.1K views
How does "cat << EOF" work in bash?

I needed to write a script to enter multi-line input to a program (psql). After a bit of googling, I found th

avatar
Eddie
0 1 0 9
asked 07 September, 2021
52 votes
30 answers
795 views
How can I measure the actual memory usage of an application or process?

How do you measure the memory usage of an application or process in Linux? From the blog article of Understand

avatar
Tana
0 1 0 9
asked 07 September, 2021
56 votes
9 answers
2K views
Redirect all output to file in Bash

I know that in Linux, to redirect output from the screen to a file, I can either use the > or tee. How

avatar
Cortez
0 1 0 9
asked 07 September, 2021
56 votes
28 answers
2.4K views
Exploring Docker container&apos;s file system

I've noticed with docker that I need to understand what's happening inside a container or what files

avatar
Suzan
0 1 0 9
asked 07 September, 2021
59 votes
30 answers
1.6K views
How to kill a process running on particular port in Linux?

I tried to close the tomcat using ./shutdown.sh from tomcat /bin directory. But found that the server was not

avatar
Venice
0 1 0 9
asked 07 September, 2021
62 votes
5 answers
1.3K views
Why does the C preprocessor interpret the word "linux" as the constant "1"?

Why does the C preprocessor in GCC interpret the word linux (small letters) as the constant 1? test.c: #incl

avatar
Kurtis
0 1 0 9
asked 07 September, 2021
50 votes
30 answers
2.1K views
Pipe to/from the clipboard in a Bash script

Is it possible to pipe to/from the clipboard in Bash? Whether it is piping to/from a device handle or using an

avatar
Suzan
0 1 0 9
asked 07 September, 2021