General :: Determine On System Where Process Substitution Creates FIFO Files?

Aug 16, 2011

I'm writing a C++ application and need to work with process substitution in the Bash shell. I'm trying to find a way to validate the paths passed as arguments to my program, some of which point to FIFO files created by process substitution.

Is there a shell (or C++) way that I can check if the system creates these files in /dev/fd or if they are created somewhere else?

View 2 Replies


ADVERTISEMENT

General :: Determine What Files Are Being Accessed By A Process

Mar 23, 2010

How would I find out all the files a particular process accesses?

I am using Ubuntu 9.04.

View 1 Replies View Related

General :: Function Having Background Process Inside Command Substitution

Oct 5, 2010

The first call to "somefunction" works as expected. The function prints "endfunction" and a process in background sleeps 30 seconds. In the second call I thought it should work in the same way, but the script sleeps 30 seconds before it prints "endfunction".Does someone know the reason of this behavior? Is there another way to do a command substitution of a function that has a background process without have to waiting for that process?

View 2 Replies View Related

Fedora :: Determine Which Process Belongs To Which Window In System Monitor?

Feb 26, 2011

I have Fedora Linux 13 64bit system. I use System Monitor to check which process is taking how much memory and cpu. Normally I have dozens of Chrome and Firefox windows open. The Processes tab shows which process is taking how much cpu/ram resources but I unfortunately there is no option like right click and make the window active that matches the PID (the one process that I have currently highlighted). Usually there is a chrome process taking up 30 or 40 percent of CPU while dozens other chrome processes taking much less cpu. I must determine which chrome window ( or any application which has multiple instances running) is taking that much CPU time. So can some one help me to solve this problem?

View 1 Replies View Related

General :: Download Scheduler Program Code Which Creates Multiple Threads Of The Downloading Process?

Apr 30, 2010

I have created a simple download schedular with source-code give below :

---------------------record_strokes.sh-------------------
touch /home/student/packs/lynx/logfile
lynx -cmd_log /home/student/packs/lynx/logfile

[code]....

View 1 Replies View Related

General :: How To Determine What Process Has A File Open

Jan 19, 2010

I'd like to determine what process has ownership of a lock-file. The lock-files are simply a file with a specific name that has been created.So, how can I determine what process has a particular file open in Linux? Preferably a one-liner type or a particular Linux tool solution would be optimal.

View 3 Replies View Related

General :: How To Determine What File Tripped Up Tar Process

Feb 8, 2010

I am writing, well actually enhancing, a script to do a daily backup of important data on my PC to a second hard drive.I wish to tar my home directory to a single file - and will probably use gzip as well.So I decided to work out the correct tar syntax in a terminal first - here is what happened.I opened a terminal window.I cd to a directory not part of my home directory.I issued the command..Quote: tar -cvf mytar.tar /home/ken tar processed a bunch of files, the last being .netrc.I examined the tar file and it contains .netrc.The contents of .netrc are correct.I scrolled back through the list of files in the terminal window and do not see any error messages.I guess the question is... how do I determine what file tripped up the tar process?

View 8 Replies View Related

Programming :: Bash - Why Is Process Substitution <() So Much Faster

Nov 25, 2010

file allids consists of 300,000 rows, each containing a 5-7 digit numeric id. file newids consists of 20,000 rows of id's. How do you explain the following timings? time: 0.07s:

Code:

diff <(sort allids) <(sort newids)
time: 1.6s:

[code].....

View 4 Replies View Related

General :: Fedora - Determine Which Process Belongs To Which Window In Monitor?

Feb 26, 2011

I have Fedora Linux 13 64bit system. I use System Monitor to check which process is taking how much memory and cpu. Normally I have dozens of Chrome and Firefox windows open. The Processes tab shows which process is taking how much cpu/ram resources but I unfortunately there is no option like right click and make the window active that matches the PID (the one process that I have currently highlighted). Usually there is a chrome process taking up 30 or 40 percent of CPU while dozens other chrome processes taking much less cpu. I must determine which chrome window ( or any application which has multiple instances running) is taking that much CPU time.

View 1 Replies View Related

Programming :: Under Which Circumstances A Child Process Creates Another Child Process Using Fork

Dec 7, 2009

Consider the following code:

Code:

int main()
{
int i=0;
pid_t pid;
for(i=0;i<2;i++)

[code]....

I get the following output:

Parent: chid_pid=4356 i=0 parent's pid=4355
This is child 4356 i=0
This is child 4357 i=1

[code]....

I can observe instead of two children(as I expect) processes there are three. This is because child process 4356 creates its own child. Why all the messages of the type "This is child X i=Y" are concentrated one under another? How exactly fork works? Is affected by the fact that I have a dual-core processor?

View 3 Replies View Related

Debian :: /bin/dash: Bad Substitution Shown Repeatedly Until Kill Process

Mar 16, 2011

if i run /bin/dash at the command prompt I get the message /bin/dash: Bad substitution shown repeatedly until I kill the process

View 14 Replies View Related

Programming :: Bash: Functional Difference Between Process Substitution And Here String With $( )

Mar 14, 2010

Further to solved LQ thread Bash: how to populate a list of arbitrarily named files?, what is the functional difference between feeding a loop with process substitution and feeding it with a here string with embedded command substitution? ABSG pages: process substitution, here string and command substitution. This works

Code:

while IFS= read -r -d '' file
do
files+=("$file")
done < <(find $dir -type f -print0)

[code]....

View 2 Replies View Related

Networking :: Creates Multiple Threads Of The Downloading Process?

Apr 30, 2010

I have created a simple download schedular with source-code give below :

---------------------record_strokes.sh-------------------
touch /home/student/packs/lynx/logfile
lynx -cmd_log /home/student/packs/lynx/logfile

[code]....

So, this is a simple download scheduler program code. Which creates multiple threads of the downloading process - wget (i could also have used 'curl' instead 'wget').Can you debug this code?

View 1 Replies View Related

General :: Encoding With FFmpeg Using A FIFO

Dec 28, 2010

I'm trying to convert Flac audio file to AAC file using command line. It's working fine. Now I want to do the same using fifo And it's freezing.So could you tall me what I'm doing wrong.

View 2 Replies View Related

General :: Cannot Determine The Gcc Include Path On System?

Mar 8, 2011

I'm trying to install tgrep using the INSTALL file but I'm gettin errors. The following messages speaks for itself.

Code:
denish@ubuntu:~/tgrep$ ./INSTALL
THIS IS THE CONFIGURATION SCRIPT FOR TGREP
answer all questions with full pathnames

I cannot determine the gcc include path on your system. Please enter the gcc include path if it is available: /usr/include

[Code]...

View 2 Replies View Related

General :: What Is Meaning That File Is Named Pipe (FIFO)?

Jul 12, 2011

What is a pipe? and why a file is a named pipe? I am just learning linux.

View 2 Replies View Related

General :: Determine What Program Is Listening To Some Port , TCP , UDP In System?

Jan 21, 2010

Is there a way to determine what program is listening to some port, TCP or UDP, in Linux?

View 4 Replies View Related

General :: Determine Version Of System That My Synology Server Running?

Jul 7, 2011

Can anyone tell me how I determine the version of linux my Synology Diskstation DS210+ is running?\

View 3 Replies View Related

Ubuntu :: Determine Which Process Has /dev/ttyUSB0 Port Open?

Jan 16, 2011

I'm developing a serial port application under Lazarus using the SunaSer code library.

The application reports an error indicating that "the Port is opened by another process".

What command can I execute in a Terminal session to determine what process has the USB-serial port open?

View 4 Replies View Related

General :: GRUB Legacy - Unable To Determine The File System Type?

Dec 8, 2010

I had only Arch on an HDD.sda2 was "/".Now it's with Windows XP and sda2 is not a root any more but a container partition wich has sda{5,6,7} in it. I configured the dual boot and it works. It finds Arch and boots it, but not completely. Stops after some time and says: unable to determine the file system type of /dev/sda2. FSTAB is configured, sda{5,6,7} are on their places. So I can't boot Arch. XP boots correctly. What do I do with this error?Also it says: try adding rootfstype=your_filesystem_type to kernel command line.

View 4 Replies View Related

Programming :: Creates A Child Process With Fork And, When The Child Ends, Receives The SIGCHLD Signal And Wait For Its Termination?

May 23, 2011

I have a doubt about signals in C programming. I have done this little program to explain it. It creates a child process with fork and, when the child ends, receives the SIGCHLD signal and wait for its termination.Ok, quite easy, BUT when I execute this code the SIGCHLD signal is received twice, first as an error (returns -1) and the second one to finish the child process.I don't understand the meaning of the first received signal. Why is it generated? Is the code wrong? (if you add the SIGINT and press Ctrl+C during the execution it also receives two signals instead of one)

Code: #include <stdio.h>
#include <unistd.h>
#include <string.h>

[code]....

View 4 Replies View Related

General :: Generate Random List And Determine Size Of Arbitrary Block Of Files In Dir?

Mar 4, 2010

I want to generate a temporary random list from a directory of files and then determine the size of an arbitrary block of files from this list (say 1-25 or 26-50) and add their names to a file along with some other info for each name. I can generate a random list with file sizes like this: ls -l | sort -R | cut -d " " -f 6 but i'm not sure how to add up the sizes of just a certain block of these files and at the same time save the file names.

View 2 Replies View Related

Programming :: Script That Creates Files From Svn Checkout And Compress Them Using Tar.gz ?

Oct 22, 2009

I'm creating a script that creates files from svn checkout and compress them using tar.gz the script gets the repository name from command line argument i need to capture a number from the last line of the output and create a file name from it.

The svn returns output of all the file names from the repository and in the end it says: revision number xxxxx. i need to get this number and then rename the tar.gz to it. how do i save the output to a variable and get this number.

This is the script:

Code:

View 1 Replies View Related

Slackware :: System All The Time Creates /.config/Trolltech.conf?

Apr 18, 2011

I am on up to date 64-current. Installed Alien Bob's multilib packages on top of it as well as his kde packages. I changed inittab to go to runlevel 4 by default.I figured out that my system all the time creates /.config/Trolltech.confI think it shouldn't be there, but even when I manually delete /.config dir, it is created again.

Code:
vladimir@darkstar:~$ ls -la /
итого 97

[code]....

View 6 Replies View Related

Server :: Winword Creates Read Only Files On Samba Share?

Oct 15, 2010

I have a similar problem with Microsoft Access and Photoshop. I am using Samba 3.2.5 and Debian 5.0

View 2 Replies View Related

Software :: User1 Can Modify / Delete All Files / Directories That Ftpuser Creates?

Feb 1, 2011

I have two users in home on Debian stable: user1 and ftpuser.Proftpd is configured so that it uses ftpuser for clients.How to set it up so that user1 can modify, delete, etc.. all files and directories that ftpuser creates?

View 3 Replies View Related

Fedora Hardware :: System-config-display Creates Incorrect Xorg.conf?

Mar 3, 2010

Now that I have system-config-display installed I tried to create a new xorg.conf so I can have 3D acceleration, etc using the correct driver. But the xorg.conf file generated does not work. It locks up the laptop (Toshiba Satellite A45-S250). I don't understand why this happens because the Fedora 12 Live CD (for i686) works find on boot.

I tried looking for the xorg.conf file after booting the live CD but it doesn't exist. I don't understand what is happening here. Also, when I used an older version of Fedora (8 I think) the X driver was i810 which worked fine. It gave me all the 3D acceleration, etc. When I installed F11 it gave me a dumbed down install using the VESA driver. What happened to the i810 driver? Why does the intel driver not work? Why does the Live CD work great but an installed system not?

Necessary info: Toshiba Satellite A45-S25 Fedora 12 (preupgraded from F11)

View 1 Replies View Related

General :: Sed Substitution Not Working

Jul 26, 2011

I read up on sed and I am confused about it and regular expressions. I am trying to replace some text on one line in a file with some text.

original text: $normal[''];
replaced with: $normal['localhost'];

In my script file file I've tried numerous combinations of delimiters, etc but obviously don't understand all the rules of regular expressions. My current sed command was:

sed -i 's/$normal[''];/$normal['localhost'];/g' /path_to_file
I also saw some examples using variables, so I tried that:
bb1="$normal[''];"
bb2="$normal['localhost'];"
echo $bb1
echo $bb2
sed -i 's/"$bb1"/"$bb2"/g' /path_to_file

In the above test, the echos both show the correct text but nothing happens to the real file.

View 3 Replies View Related

General :: Sed Command Does Not Perform Substitution

Jul 22, 2010

I've been trying to use a find command with -exec to find the differences between identically-named files in different paths. My initial attempt was to do something like this:
Code: find trunk/ -type f -not -path '*.svn*' -exec diff '{}' `echo '{}' | sed 's/^trunk///'` ;

Unfortunately this does not work at all as expected (the diff ends up executing on the same file)! I have narrowed it down to the subshell (inside the ``) but beyond that I have no idea. For some reason the sed, though written correctly, does not perform the substitution. I've changed the diff to echo and played with the sed command and the only way I can get it to perform _any_ substitution is to use .* as the regex. Even s/.*trunk.*/SUB/ doesn't work. Any insight into the inner workings of -exec/subshells/pipes or some crap I'm missing? Don't worry about rewriting the command to make it work; I simply swapped the paths and got rid of the subshell nonsense and everything works fine.

View 4 Replies View Related

General :: Shell Script For Substitution?

Jul 9, 2011

So, I have 100 folders each of them include a file called script.txt and script2.txt. the file script.txt has and 100include files that have the same name like the folders. So, for example if I have the folders A, B and C then the script.txt will include 3lines such as:

*include A
*include B
*include C

I want for each folder (A, B and C) to create script2.txt which will substitute *include A with $include A, respectively for each folder.

so for folder A, I will have script2.txt

$include A
*include B
*include C

[Code].....

but it is substituting "*" with "$" in each file for all the lines. I think i should probably close earlier a loop.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved