Skip to content

Tag: linux

Docker: attach to a specific bash

Lets say I have a container running and I do Then I detach from this container and want to attach again If I do this I wont go back to that bash that I created. Instead I will go to the main process. How can I attach to that bash again ? Answer You can’t. While the docker exec documentation

Bash Scripting checking for home directories

I’m trying to create a script to check if user accounts have valid home directories. This is what i got at the moment: This works. I get the expected output which is the username of the account with an invalid home directory. eg. output However, I am unable to make it so that ONLY if there is no issues …

Unable to connet to SQL server using soci library

I am beginner in c++,my problem on Linux for connecting to SQL Server with soci library, my code this but I have error and I don’t found solution for my problem, my code this: I have error: Here is the code: Answer Your ODBC connection string in incorrect, your first parameter specifies a datasource cal…

Docker difference docker run[…] docker container run […]

Is it difference between this commands? In addition then why in second command uses -i(Interactive) and -t(TTY)? Answer docker container run is equivalent to docker run, as well as nearly all docker container commands can be found without container subset. About -it. t creates console (tty), and i forwards yo…

Live Linux grep script – only print positive results

I try to code a bash 4 (or sh, if that’s possible) script that does the following: 1st parameter: the path to the compressed modules to search, could be “.” 2nd the search pattern to look for The script so far looks like this (be aware that it is not foolproof, it not checks if both paramete…