General :: Remove Unwanted Output That Comes From Executing System Api?
Apr 27, 2010
How to remove unwanted output that comes from executing system api?
for eg:when i execute system("telnet 127.0.0.1") i want the output to start with login and then password and then directly the command prompt,how can i remove the output that gets generated before showing the prompt?
View 3 Replies
ADVERTISEMENT
Jun 29, 2011
I'm using Ubuntu and I'm programing with eclipse CDT. My goal is to execute a php file and read the output to my c++ program. To do so I thought I should use fork(), dup2() and execl. When in shell, the call "php myscript.php" worked just fine, but when in c++ I tried:
execl("usr/bin/php", "php", "home/geiger/workspace/SemiServer/server_content/myscript.php", NULL);
And it didn't work (the process wasn't terminated and I got no output). I tried different version of this call, like losing the "php" string and/or drop "home/geiger" from the path string, to no better result.
View 1 Replies
View Related
Jul 14, 2010
I am writing a script which will fetch data from different machines and display it on single terminal. I have created a file named SERVERNAMES containing ip address of machines I need to monitor. Then for every IP I am issuing ssh command to get date on that machine. However When I am trying it on the script it is just giving me output of first server and it is ignoring rest servers mentioned in file. ssh works fine without password for all machines mentioned in SERVERNAMES.
Code:
# cat SERVERNAMES
10.180.45.231
10.180.45.235
10.180.45.238
10.180.45.211
Script
Code:
#!/bin/bash
while read line
do
#Calculate Load on remote machine.
Date=`ssh -T -q $line date`
echo "Date on $line is:$Date"
done < SERVERNAMES
Code:
output.
Date on 10.180.8.231 is:Wed Jul 14 10:48:46 IST 2010
I am not getting the output for .
Code:
10.180.45.235
10.180.45.238
10.180.45.211
Is there anything wrong in ssh?
View 5 Replies
View Related
Jul 18, 2011
I am using g++ 4.5.2 I copied and tried a piece simple (Making a Class Writealbe to a Stream) program, from page 363 of book(C++ cookbook), Example 10-6 your can download and test by yourself [URL]
[Code]....
View 1 Replies
View Related
Jun 2, 2011
I have a script, I am able to send the output of the script to both the screen and a file as shown below
Code:
./script | tee -a temp.log
I wonder is it possible to achieve same thing by executing some commands inside the script. As for other users, who execute the script it is not advisable to pipe the output of script with the help of tee command. Again, keeping |tee at the end of every line of the script doesn't seem to be advisable. I tried with this for couple of lines and it works. Is it possible to get the output of script to both screen and file by just executing name of the script, with some script tweaking ?
View 4 Replies
View Related
Jul 23, 2009
Want to remove some unwanted icons from my screen but can't seem to figure out the best way.
View 2 Replies
View Related
Apr 8, 2011
I have so many entries in GRUB and have to actually scroll down so much to see windows entry. How do I remove unwanted entries in GRUB? Also How can I make a background picture appear when grub manager comes up?
View 9 Replies
View Related
Nov 22, 2015
There are these shortcuts in the GTK3 file chooser: [URL] ....
With the exception of "desktop" which I included in the red box by mistake, I don't want those shorcuts to be there. I've even deleted most of those folders from my home directory because I have no use for them, but the shortcuts remain even after the folders are gone.
How to remove/disable these shortcuts? And while I'm at it, I notice that it's not using my selected icon theme for those icons. Any way to make it use my choice of icon theme?
View 1 Replies
View Related
Oct 11, 2010
I would like to know how to remove X lines from output. i have a test file and i want the output without the first 2 lines
[root@node1 ~]# cat test
1
2
3
[code]....
View 5 Replies
View Related
Sep 14, 2010
I have a WD external disk, NTFS file system. I mounted it on my Red Hat. While on the external disk, I deleted a directory, which was sent to .Trash-root of that disk.I went to .Trash-root and did rm -rf to completely delete that directory, but I got the following error: cannot remove `<directory>': Input/output errorWhen I do ls -la on that directory that I wish to remove, it shows me it has 0 files inside. But not only I can't remove it, I can't do anything else with it (copy, etc). And I have all the rights on that directory, so this isn't the problem.
View 6 Replies
View Related
May 9, 2010
Using Nicotine+ I accidentally downloaded about 11000 files from an user who's evidently too busy to properly organize his archive, and got all his stuff stored in only one big folder.
Nicotine obviously crashed, and I'm not able to open it anymore. When I launch the program, it immediately freezes, and I can do nothing but force its quit. I tried to remove and reinstall the program, but the problem persists. So I was wondering if there's a way to remove the downloads from the list outside Nicotine, editing some files.
View 2 Replies
View Related
Oct 5, 2010
Ive managed to get myself in a bit of a hole through fears of destroying my WinXP on a new dual boot installation. I�ve been using Ubuntu (10.04 lts) alone on an old machine which died, so I thought I�d just move the hdd to my main machine & dual boot it with XP.
I booted from the 10.04 lts CD to set this up, I let it do as it suggested & assumed it would see the existing Ubuntu installation & modify it to dual boot with Win XP. Which it did except I now have two instances of 10.04 on the second hdd as it added a second partition for the new. Leaving the already installed 10.04 alone. I saw no options other than the advanced partitioning which I did not look at.
How please can I correct this & go back to having just one instance of 10.04 on the Ubuntu disk to dual boot to � I am sure there must be an easy way. I have nothing on the Ubuntu disk I need to preserve. I know nothing about Linux command line.
View 9 Replies
View Related
May 5, 2010
The default output audio port Ubuntu doesn't work on my system. It should be "Analog Mono Output/Amplifier", instead of "Analog Output/Amplifier". I can easily change that in sound preferences, just by choosing the right port in the "Output" tab. The problem is this would only apply to a single account, and I would like to change it system-wide, so it applies to all accounts on the system (I have more than 100 users...).
Update: I can achieve the same effect as I would by changing it in sound preferences using the following command: pacmd 'set-sink-port' 'alsa_output.pci-0000_00_1f.5.analog-stereo analog-output-mono;output-amplifier-on' Unfortunately that's still not system-wide,
View 2 Replies
View Related
Apr 27, 2010
Which commands do you use to output the current users logged into the system and accessing a specific file?
View 5 Replies
View Related
Nov 16, 2010
The output of my fdisk command is as follows :-zodiac@gml-admin:~$ sudo fdisk -l[sudo] password for zodiac: Disk /dev/sda: 160.0 GB, 160041885696 bytes255 heads, 63sectors/track, 19457 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe30ce30c
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1958 15727603+ 7 HPFS/NTFS
/dev/sda2 1959 4752 22437838 f W95 Ext'd (LBA)
[code]...
View 2 Replies
View Related
Apr 16, 2010
Can anyone tell me how can i remove a bad link in linux
i have created one link to a file now i shifted that file to some other location .Now i have to delete that delete the previous link ie bad link
View 1 Replies
View Related
Jan 11, 2011
I am using currently squid 2.5 version in my red hat Linux box. I want to uninstall it and install 3.0 version. Being a new user I want to know
1- How to uninstall previous software packge like squid using terminal ?
2- To install new version of squid?
If I go to http://www.squid-cache.org/Versions/v3/3.0/ web sites i can see
diff Download
diff(sig) ar.gz(sig) / tar.bz2(sig)
I am confuse under differ column i can see diff(sig) and under Download column ar.gz(sig) / tar.bz2(sig).
what means by diff(sig)and ar.gz(sig)/ tar.bz2(sig) ?
View 5 Replies
View Related
Jan 17, 2011
How do I remove linux so I can install windows xp?
View 14 Replies
View Related
Jul 22, 2010
I noticed after uninstalling Firefox that the folder is still listed in the files/etc ... how do I delete these files?
/etc/firefox
/etc/firefox-3.0
/etc/forefox-3.5
View 4 Replies
View Related
May 19, 2010
If you create a file on UNIX/linux with special chars, like touch "la*, you can't remove it with rm "la*. You have to use the inode number(you can if you add the before the name, I know, but you'd have to guess as a user that it was used in the file creation).
I checked the manpage for rm, but there's no metion of the inode number. Doing rm inodenumber doesn't work either.
What is the command for this?
View 4 Replies
View Related
Feb 17, 2011
I have a few problem. I have a txt file that convert from pcap to txt file. What I want is to eliminate unwanted text from my txt file. Here is the example of the what I want to do:
This is original file in txt file
Quote:
No. Time Source Destination Protocol Info
1 0.000000 158.27.22.66 61.39.220.82 HTTP Continuation or non-HTTP traffic
0000 00 1f 9e 1a 5b 00 00 21 55 84 9a ff 08 00 45 00 ....[..!U.....E.
0010 05 8c e4 14 40 00 36 06 8d 1c 3a 1b 16 42 a1 8b ....@.6...:..B..
0020 dc 52 00 50 05 12 18 d4 17 f0 64 3f b0 94 80 10 .R.P......d?....
[Code].....
View 6 Replies
View Related
Sep 24, 2010
I'm confused while trying to fix controls styles (tabs, buttons, scrollbars, main menus, popup menus) of my 3dparty applications in KDE. The problem reflected in the fact that all controls of non-KDE applications (Firefox, Zend Studio, Gimp,..) have Gnome styles. But setted widget style is "Oxygen".I assume that this problem has appeared after installing new fonts in my system.
View 10 Replies
View Related
Apr 14, 2010
How can I remove characters from grep output using sed? code...
View 9 Replies
View Related
Jul 15, 2011
I have been setting up my laptop as a dual boot with Win7 (yuckkk!) and Ubunutu 11.04. My HP Pavilion dm4 came with 4 primary partitions used by Windows! (Again, yuckkk!) I got rid of Windows_recover partition (I don't remember the exact name) converted that primary partition to an extended partition and then installed Ubuntu in virtual partitions. All that works.What I don't like is that the partition HP_TOOLS shows up in Nautilus, and if you click on it, it self-mounts and makes that partition accessible.
View 8 Replies
View Related
Apr 8, 2010
I m using sendmail. I have two queries regrding mailq
1) How i can move unwanted mails from mailq to diffrent folder?
2) How i can remove those mails from the mailq ?
View 3 Replies
View Related
Jan 21, 2011
When running rsnapshot tonight it failed with a bunch of
cannot remove `file': Input/output error
errors.
I navigated to the directory and tried to delete it manually and I got the same errors. I tried with 'sudo rm directory'. How else can I delete this directory? What would cause a situation like this?
View 9 Replies
View Related
Apr 8, 2010
I got a new HDD like a Storage on my Ubuntu ,it is formated as ext3 and i am able to mount it ,but sometimes while downloading from FTP ,when the session broke Ubuntu crates some ./afternature.mp4 Input/output error ,which i can see on "ls -l" ,and that causes great troubles to me ,because i can not copy or write on that disk another file with the same one which is created like this ,these error are gone only if i format the hdd .
My mounting command is "mount /dev/hdb3 /tmp/hd ext3 rw 0 0" So is that possible to remove these error without formatting the disk . PS:I did a lot of search for that error ,on unix forums also here but i didn`t find a concrete answer ,i found a thread which is for that case but removing with inode is impossible because on ls -l i`m not receiving the inode .
View 5 Replies
View Related
Mar 10, 2010
I am using Slackware 13 x86_4. I have it set so that when I close my lid, it suspends to RAM. When I open my lid, it asks for password, but after I enter it, it freezes. I force KDE down by Ctrl+Alt+Backspace then read the errors. It says:
Code:
xauth: error in locking authority file /home/ridwan/.Xauthority
rm: cannot remove '/home/ridwan/.serverauth.3457': Read-only file system
When I try to startx again, it says
Code:
/usr/bin/startx: line 158: cannot create temp file for here document: Read-only file system
/usr/bin/startx: line 174: cannot create temp file for here document: Read-only file system
/usr/bin/startx: line 174: cannot create temp file for here document: Read-only file system
[code]...
It forces me to power off the laptop by holding down the power button. When I try ctrl+alt+delete, I get an error saying "can't execute from /sbin/shutdown/"
View 14 Replies
View Related
Jan 14, 2010
My present working is
Code:
linux:/home/anisha/downloads/mapnik-0.6.1/demo/c++ #
Now I want to run "python scons/scons.py" located in
Code:
linux:/home/anisha/downloads/mapnik-0.6.1/ #
I tried
Code:
../../python scons/scons.py
From the above stated PWD but it resulted in the following:
Code:
bash: ../../python: No such file or directory
What is the way to execute a file of some other directory from the PWD!
View 14 Replies
View Related
Jun 16, 2011
Running following script for checking root ssh login status.
Code:
Flag=`cat /etc/ssh/sshd_config | grep "^PermitRootLogin"`
if [ -z "$Flag" ]
then
[Code].....
View 1 Replies
View Related