Programming :: Run C Program From Anywhere Within The System (Ubuntu 10.10)?

Apr 30, 2011

I want to add my C program's path to the environment variable PATH. My C program called "md5". So that I can execute it from anywhere (i.e any directory). My md5 program is located at "/home/ahuq/MappingServer/md5_program". So what I did was to put: "export PATH=$PATH:/home/ahuq/MappingServer/md5_program" in the running SHELL. This only makes temporary changes and lets me run the "md5" program from anywhere temporarily.

root@ahuq-kitchen:/home/ahuq# md5 -sanis MD5 ("anis") = 38a1ffb5ccad9612d3d28d99488ca94b But I want to make this change permanent. I tried to put the line "PATH=$PATH:/home/ahuq/MappingServer/md5_program" at the end of "/home/ahuq/.bashrc" and "/home/ahuq/.profile" files. I logged out of the SHELL and
went in again. But it didn't work:

root@ahuq-kitchen:/home/ahuq# md5 -sanis
No command 'md5' found, did you mean:
Command 'cd5' from package 'cd5' (universe)
Command 'mdu' from package 'mtools' (main)
Command 'mdb' from package 'mono-debugger' (universe)
md5: command not found

Maybe I am putting the PATH statement in the wrong place of the above mentioned files. There are a lot if-else-fi structures inside those two files. Do I need to put the PATH statement inside any of those structures? Do I just logout or do I have to restart the system to make the changes active?

View 8 Replies


ADVERTISEMENT

Programming :: Get System Current Status To C Program From 'htop'

Jan 17, 2010

Actually I suppose to use this "htop" command to get the system utilities like current processor speed ,running programs ,memory usage(ram and swap) to my program. I planned to get it using popen(). I was success popen("top | grep Mem", "r") with top command. But are there a way to take such information using "htop". Or are there any idea of taking current CPU,MEM,Swp usage as well as Tasks and running tasks using htop or other way to C program...

View 1 Replies View Related

Programming :: Where To Download To Learn / Program Java For System?

Oct 5, 2009

I went to the sun website but all I see are upgrades to JDK 6, I dont see where to download the actual JDK.

Anyone know where I can download the JDK for Linux?

View 9 Replies View Related

Programming :: Can Static-built C Program Run On System Without Libc Installed?

Sep 13, 2010

Okay, just wanted to be perfectly clear on this point... /static/ software builds don't link to /any/ shared libs, right? I.e., can a static-built C program run on a system without a libc installed?

View 1 Replies View Related

Programming :: Quick Measurement Of Free System Memory From Within C Program

Jul 21, 2010

I need to monitor the amount of free physical memory on Linux from within a large C program. The sampling will occur very frequently, so the measurement cannot be performance intensive. The fact that Linux uses much of the theoretically free memory for cache and buffers means that just measuring the free pages is not sufficient. Using free + cache + buffers gives an overestimate as not all cache/buffers can be freed, but I could get a rough idea of how much generally can't and subtract that from the answer.

Possible options that I've come across so far are: Parsing /proc/meminfo - but that involves reading from file which is slow. Extracting the free, cache and buffers values from the output of the Free command - but is there a quick way to do this? Parsing the /proc/freemem file produced by the API here - but this is again reading from file. Is there a way to get that output directly? Speed is an extremely high priority, and the answer it must accurately represent the amount of memory that my program could expand into (to within a few Mb).

View 1 Replies View Related

Programming :: Write A Bash Script Program In System Command Terminal?

Mar 22, 2010

I'm trying to write a bash script program in the Linux command terminal that will write to a fellow user and then continue reading down the program. this is what i have (kind of explains the idea too):

#!/bin/sh

clear
echo "this is before the write command"
write jcummins
this message should go to jerry
echo "the message didn't send and this string will not appear"
echo "it appears it has stopped at the write command"

View 5 Replies View Related

Programming :: Compile C++ Program Without Changing #include Line & Header Files Not System?

Apr 3, 2011

I have C++ source code(*.cpp) files that expects it's header files in System's include folder which is/usr/include.The cpp files has include lines like this:

Code:
#include <some.h>
#include <another.h>

[code]...

View 3 Replies View Related

Ubuntu :: Inbuilt Logging System - Ran And Installation - Program Opened Automatically - Can't Find Program Executable

Feb 23, 2011

I was wondering whether there is an inbuilt logging system in UNIX?

I ran and installation and the program opened up automatically but I can't find the program executable.

If I could find a log then I could locate this file.

View 9 Replies View Related

Programming :: Calling "system()" Function From Cgi C Program?

Apr 3, 2011

when i call the "system()" function from my C program everything works well, but when i try to call it from a cgi C program it doesn't work. the server log tells me this is a permission error.i have chmod'ed 755 the cgi program but it still does not work.

View 5 Replies View Related

Programming :: Program A SH - Bash Program With Zenity To Play Radio Based On A Site?

Feb 15, 2011

I will have to code this. However I am lacking of time since I have too much to do. make a short code bash/dash to prompt the country with Zenity, then, get the PLS or m3u url and prompt with another zenity which radio to play. http://www.listenlive.eu/index.html

My code to get url's radio country.htm is:

Code:

View 2 Replies View Related

Programming :: Open Or Run A File/program Through A C++ Program

Jan 15, 2010

Ok so Basically i have 2 questions

1. i know how to create a file with c++ using but is there a way to save it to a specific location on your computer with windows and linux

Code:

2. i need to know how to run/execute/open a file in a c++ program im using and its not working

Code:

View 4 Replies View Related

Programming :: Build A Simple Program For C Programming Class?

Feb 12, 2011

im trying to build a simple program for my C programming class, this is the source code

#include <stdio.h>
int main()
{
int length, width, length, height, area, perimeter;
perimeter = width + length + height;
area = width * length + heigth;

[Code]...

i dont see any error (you might)but every time i run it it runs but after it asks me to input for the width i do it but it doesn't take me to the length, it just stays blank until i input another value in the same place for the width, it asks me for 4 inputs in total i don;t know why, and after i run it different times it gives me different values for the perimeter and are. how can I fix this?

View 5 Replies View Related

Ubuntu :: Best CAD Program For System?

Oct 6, 2010

What's the best CAD program for ubuntu? I've looked at several and My choices are: qcad and freeCAD.

View 9 Replies View Related

Ubuntu :: Run A Program On System-idle?

Apr 8, 2011

Torrents client kills my Internet connectivity so bad I can't even use a web-browser whilst it's on -- pages take like five minutes to load -- I often forget to turn on my torrent client. Which led me to wonder if there's a way I can launch a script on system idle?

View 1 Replies View Related

Ubuntu :: Program Find The 32-bit Libraries On A 64-bit System?

May 19, 2010

A 32-bit program (Cisco AnyConnect VPN Client) appears to be trying to load a library from /usr/lib even though the 32-bit library is installed in /usr/lib32:

ak@myo5a:~$ /opt/cisco/vpn/bin/vpnui
/usr/lib/gio/modules/libgvfsdbus.so: wrong ELF class: ELFCLASS64
Failed to load module: /usr/lib/gio/modules/libgvfsdbus.so

[code]....

View 7 Replies View Related

Ubuntu :: Unused Program In The System Monitor?

Feb 11, 2011

I wondering does the evolution-alarm-notify and evolution-data-server-1.4 would remove from the system monitor or just leave them alone. I didn't want to touch them that would cause system diseaster, can you please confirm for both if say yes to remove that will be good safe.. I am running older version of Ubuntu 5.10 on my lappy.

My firefox browser takes too much memory that runs very slowest and I need to cut down the both program list above or what I need to remove some other program in the system monitor.

View 1 Replies View Related

Programming :: Send Some Data From A System To A Windows System And Vice Versa?

Mar 4, 2010

How can I do some socket programming using which I can send some data from a linux system to a windows system and vice versa. Can we do that using the IO:Socket:INET perl module??

View 10 Replies View Related

Programming :: Gcc And Pow In A C Program?

Feb 5, 2009

I found some interesting behavior when discussing the pow function from Math.h with someone. I am well aware of the need to compile with the -lm flag, but to my surprise this actually isn't necessary if the arguments to the pow function are literals. For example, this program compiles in gcc without using -lm:

Code:

#include <stdio.h>
#include <math.h>
int main()

[code]....

If I try to change the call to any of these:

Code:

double bCubed = pow(2.0, e);

Code:

double bCubed = pow(b, 3.0);

Code:

double bCubed = pow(b, e);

Then the -lm option is required or else it can't compile. So does anyone know why it's necessary to use -lm when the argument(s) is/are variable(s) but it works fine if both arguments are literal values? As a side note, any of the above compile with g++ however. Also, if it helps, this is the version of gcc I'm using:

gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44)

This doesn't happen on my Mac however that is running: i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5484)

View 3 Replies View Related

Programming :: Getting TTY Id From A C Program

May 23, 2009

I am new to linux/c programming and I am trying to get TTY id from my c program. Something like this:

int TTYID = get_ttyid();

How do I do that?

View 1 Replies View Related

Ubuntu :: Program - Displayed System Information - Cpu - Ram Usage

Jan 17, 2010

I used to have a program that displayed system information (cpu/ram usage, stuff like that) but the name escapes me at the moment. The key feature of this program is that it was intergrated into the desktop.

View 3 Replies View Related

Ubuntu :: Peer Block Type Program For System?

Aug 12, 2010

Is there a program like peer block for ubuntu? It is an ip filter program. Here is the website to help answer questions on what type of program it is. http://www.peerblock.com/

View 6 Replies View Related

Software :: Test / Cleanup Program For Ubuntu System?

Apr 9, 2010

Have Ubuntu & it was working well, but has become slow, 'greys out' on me regularly - eg. pic loses colour & nothing will respond for a few or more seconds. Also 'Ubuntu Software Centre' & "Synaptic' thingy come up with errors, saying can't install or uninstall progs. Although it seems they may do it OK despite saying they can't. Have Computer Janitor installed, but this is no longer working at all. So... is there a program or such that I can use to test/clean out the system?? For that matter, is there a program for testing hardware, as I'm not sure if it's an indication of unhealthy hard drive or such?

View 1 Replies View Related

Programming :: Implement A System Call For Displaying The System Statistics

Nov 6, 2010

I have been assigned to implement a system call that report the system statistics over all memory which are

Total Pages in Active LRU list
Total Pages in Inactive LRU List

View 1 Replies View Related

General :: Where To Put Program In File System

Jul 22, 2011

I have downloaded DavMail and its currently living and running from my /home/user/Downloads/DavMail

in this folder is

davmail.jar
davmail.log
davmail.sh
Lib/

[Code]....

I need to put davmail in a better location than downloads but am unsure where to put it, Im guessing if I seperate some of the files/folders such as lib ill have to modify the davmail.sh file.

wheres the best location to keep this or should it remain in my home folder, I was going to put this in

/usr/local/bin
/usr/local/lib

But the jar count as a binary? the .sh certainly wouldnt.

View 2 Replies View Related

Programming :: Error In My C++ Program ?

Mar 15, 2011

The following is the error in my program :

Here is my program...

View 7 Replies View Related

Programming :: Autorun Program In C++

Mar 10, 2010

With what functions i can write my program in /etc/init.d with c++ to start every time the computer starts ? (like in windows with RegOpenKey,RegSetValueEx..............) ?

View 4 Replies View Related

Programming :: C Program To Get Cpu Utilization?

Feb 26, 2010

language:cOs: ubuntuI have googled for a c program to get cpu utilization factor from 2 days.We can get it through "top", "who" commands..But I hav not found any API or a program.

View 5 Replies View Related

Programming :: Chat Program In C

Aug 17, 2010

Am new to this community and this is my first post. am doing a project where i have to develop a wireless ad hoc routing protocol. I have just begun working on the project. I did not know where to start, so started off with a simple chat program using TCP and thought of making the modifications to it later on. But I do have a prob even i running that!

Am not getting the messages in a synchronized manner. The prog is running fine, but the messages that i type from the server are not reaching the client at all, and at times some garbage values are getting printed(When the strcmp()fn returns 1, "connection terminated" gets printed timely in both the sides. this is the oly situation where i do not get garbage values.) am using VC++ 6.0 here.I have been breaking my head for the past 3-4 days for this simple issue. any response to this would be of great help.

View 14 Replies View Related

Programming :: How To Use __attribute In My Program

Nov 22, 2010

I have checked following two pagesand this page also In following program I want to use attribute keyword of C and format string as printf

Code:
#include<stdio.h>
int myfunction (int ,int);

[code]....

View 1 Replies View Related

Programming :: Make A GUI Program From C?

Jun 30, 2010

I want to know how can I make a GUI program from a shell program I coded in C a long time ago. Can anybody point me to good tutorials?

View 4 Replies View Related







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