How does “cat << EOF" work in bash?

This is called heredoc format to provide a string into stdin. See https://en.wikipedia.org/wiki/Here_document#Unix_shells for more details. From man bash: Here Documents This type of redirection instructs the shell to read input from the current source until a line containing only word (with no trailing blanks) is seen. All of the lines read up to that point are then used as the … Read more

Building HelloWorld C++ Program in Linux with ncurses

I successfully ran sudo apt-get install libncurses5-dev Within my Eclipse window I then try to build the following HelloWord.cpp program: I get the following error: It looks like the compiler is searching for the ncurses library and can’t find it? I checked /usr/lib and the library does not exist there so do I need to manually link the ncurses library … Read more

Explaining the ‘find -mtime’ command

The POSIX specification for find says: -mtimen The primary shall evaluate as true if the file modification time subtracted from the initialization time, divided by 86400 (with any remainder discarded), is n. Interestingly, the description of find does not further specify ‘initialization time’. It is probably, though, the time when find is initialized (run). In the descriptions, wherever n is used as a primary argument, … Read more

QEMU: /bin/sh: can’t access tty; job control turned off

From Linux From Scratch Chapter 6.8. Populating /dev 6.8.1. Creating Initial Device Nodes When the kernel boots the system, it requires the presence of a few device nodes, in particular the console and null devices. Create these by running the following commands: You should then continue with the steps in “6.8.2. Mounting tmpfs and Populating /dev”. … Read more

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