LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 11-10-2008, 10:24 PM   #1
admirelinux
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
claudius753
Member
 
Registered: Jan 2004
Distribution: Mac OS X 10.6.4 "Snow Leopard", Win 7, Ubuntu 10.04
Posts: 322

Rep: Reputation: 31
What about:

Code:
system("whatever command you want");
 
Old 11-10-2008, 10:58 PM   #3
admirelinux
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
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,117
Blog Entries: 2

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


Reply


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


All times are GMT -5. The time now is 02:19 AM.

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