Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-10-2008, 10:24 PM   #1
LQ Newbie
Registered: Nov 2008
Posts: 5

Rep: Reputation: 0
want to execute edquota command inside a c program

hi all
me new to linux..
have learnt the usage of quota command
when i run the command from terminal i get to edit the quota through vi editor..
so i want to know how i can run edquota command from a c program.

Thanks in advance,
Admire linux
Old 11-10-2008, 10:34 PM   #2
Registered: Jan 2004
Distribution: Mac OS X 10.6.4 "Snow Leopard", Win 7, Ubuntu 10.04
Posts: 322

Rep: Reputation: 31
What about:

system("whatever command you want");
Old 11-10-2008, 10:58 PM   #3
LQ Newbie
Registered: Nov 2008
Posts: 5

Original Poster
Rep: Reputation: 0
thanks for your reply
i used edquota -u username.
here when i execute the command from terminal i get the vi editor by default
and when i save it it is converted to binary by the edquota command and stored in the quota.user file right ....
so i cannot not edit that binary file directly...
if i use system (command) then i cant edit the file that opens..
thats my problem ...
is there another way ??
Old 11-10-2008, 11:11 PM   #4
Senior Member
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
Just a guess but you'll probably have to use a pseudo-terminal, some manpages to look at, pty, forkpty, pts


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
execute shell command inside of c code? khucinx Programming 6 10-26-2010 09:30 PM
Execute a windows command from inside a c-cgi-script leamassiot General 51 02-09-2006 10:06 AM
very new to C, how to execute command inside C? neurotic85 Programming 5 09-05-2005 08:19 AM
execute shell command inside of tcl file khucinx Programming 1 07-05-2004 01:29 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:24 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration