I'm using a C program and I'm trying to figure out how to run (or launch) another program from within it. I would need to be able to write data into STDIN of the program that's been launched. Also, I would need this to work using Linux too.

We currently have several images that are named with a generated uuid1 string. Is there a way to find all these images using the "find" command in Linux? I tried using this: find . -regex "[a-f0-9\-]\{36\}\.jpg". But that didn't work. Could something be wrong with the regex? If not, what should we...

I understand in Linux that to redirect the output from a screen to one of my files, I can use either the > or tee. But I can't figure out why the output is actually still the output to the screen (and now written to the file). Would there be a way to redirect the output just to the file?

Does anybody know if there's a way to set "chmod 755" for /opt/lampp/htdocs and it's content including subfolders and files? And if I create a new folder, can the chmod be automatically set to 755? Sometimes, this works but only for this folder. chmod 75 /opt/lampp/htdocs

Hello all! I have been in the IT Industry for several years now and wanted to know the best locations online to get started working with Linux? I have limited UNIX knowledge such as creating / modifying user accounts and working with the print queue, but I would like to gain a strong foundation in...

I'm currently trying to install a program (that's a Java application) on my Linux machine but we keep receiving the following error: ~$ java -jar gate-5.0-beta1-build3048-installer.jar - ERROR - java.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation...

I'm running a C program, it keeps saying "core dumped" but I don't see any files under the current path. I've already set and verified the ulimit, like so: ulimit -c unlimited ulimit -a I also tried finding the file name core but couldn't find that. Where is this core file?

I'm currently using Bash and I already know that calling foo displays any output from that command on the stdout. Also, I know that foo > output redirects any output to the file specified. But here's my question: Would there be a way to redirect the output to a file and have it displayed on...

Would anybody be able to recommend a safe solution that replaces spaces with underscores in fire and directory names that start from a given root directory? Here's what I have so far: $ tree . |-- a dir | `-- file with spaces.txt `-- b dir |-- another file with spaces.txt `-- yet another file with...

Would it be possible to turn off/on power supplies from a USB manually with Linux? We have an external USB fan and we're trying to control it from the terminal (because it's position is far away). Thank you for the help.

I'm trying to pause an input in a Shell script and prompt the user for choices. Just the standard 'Yes, No or Cancel' type of question. Is there a way to do this at a typical bash prompt? I would appreciate any help.

I'm trying to figure out if there's a way to run an untrusted C program under a sandbox in Linux. I'm looking for something that would prevent the program from opening files, network connections, etc. The program would also need to be short lived since it has unit tests on it. Can anybody help me...

In Bash, I'm trying to iterate over a list of files. I know the list is the result of a "find" command, so I came up with this: getlist() { for f in $(find . -iname "foo*") do echo "File found: $f" # do something useful done } It works fine until a file has spaces in its name. $ ls foo_bar_baz.txt...

My friend and I are using Linux and we want to have our program accept arguments when it'executed from the command line. So, here's our example: ./myprogram 42 -b -s So our program would store the number 42 an an int and execute certain parts of code (depending on what arguments it gets). How can...

I'm currently working on a Linux machine through SSH and I'm trying to leave a process running throughout the night so I thought I would be able to do that by starting the process in the background and redirecting stdout to a file. But that didn't work. But as soon as I close SSH, my process is...

To follow this tag...

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States.
Privacy