General :: The READ System Call In UNIX?
Oct 29, 2010mplement the read system call in unix...i want the code for read system call...
View 6 Repliesmplement the read system call in unix...i want the code for read system call...
View 6 RepliesI have the following code:
Code:
#include <stdio.h>
#include <stdlib.h>
int main() {
system("ps -ef | grep myprocessname");
return 0; }
When I run this program it outputs the following list of running processes:
Code:
root 10279 10275 0 13:02 ? 00:00:00 myprocessname myvar1=value1 myvar2=value2
root 10341 10337 1 13:02 ? 00:00:00 myprocessname myvar1=value1 myvar2=value2
What I want to really do is instead of writing the output to screen I want to read the output and parse the various values value1, value2 etc. What is the best way to do this?
I want to populate an array of string by files exists in directory on mounting of file system. I got an entry point for file system mount. I can use either do_mount function or fill_superblock function. But I am not clear about how to call readdir from there itself. I need inputs for calling readdir from fill_superblock function.
View 2 Replies View RelatedIn practice I have a script that call a java program that call a linux system command. The script if I run it, from a shell functions well,so it is not a java problem. The problem come out when i put this script in a crontab schedulation. The result in this case is that java do not execute the system command. I think it depends on crontab
View 4 Replies View RelatedWhats the drifference between unix and linux senior?..
View 7 Replies View Relatedwhat is what is signal 0 in linux system call ?i can't find that in kill -l signal list . i need to know what is signal 0 . * for examples signal 1 is SIGHUP and signal 2 is SIGINIT . what is signal 0 ?
View 1 Replies View RelatedWhat are the directories and files in Unix file-system that has default user permission set. For eg. home directory of a user can't be seen by the other users on the system without his permission. In the same way what are the other directories that by default has user permission set at the time user account has opened. Eg. /etc,/bin or what
View 3 Replies View RelatedHow can I display every man page available on a unix system? I want to list them all in an easy manner without manually digging up all the search paths, etc.
View 1 Replies View RelatedI have added a new system call for kernel version Linux 2.6.25-14.fc9.i686. after kernel compilation and running the user mode program i am getting the below error
Error :: Function not implemented
Error number 29
I cannot find the syscall_table.S or entry.S file in the source code , so i didn't made the entry of the syscall in this file, how much necessary the entry of syscall presence in this list and how to get this file?
I am searching for any system call similar to "ls" command we use in shell. My requirement is knowing the files and directories in curent working directory and process them based on there type. Here as of now I spawn another procees with system command like system
("sh ls -l | grep ^d | awk '{print $9}'").
Instead of this I want to use any system command where I can capture this information directly into my local character buffer. My opinion is that system calls will not spawn another process as a result less time it takes, another reason is once I use the system command again I need to capture the information to a local file then again read it into local buffer. I want to avoid the file manipulation here.
I want to read the line in the text file and get the string in the file and paste it in the directory column
for example i have a line like /ftp/prod/SWC1407.DOC
from this 1407 should be parsed and appended at the end of the move command
mv /ftp/prod/SWC1407.DOC /nfp/1407
I'm trying to mount a folder located at 10.0.0.1:/pxe/ on eth1 but I'm not sure how to do this with two NICs enabled. The command mount 10.0.0.1:/pxe/ /mnt/pxe/ works fine when I only am using the one NIC the appropriate machine is on, but how can I specify to use eth1 when eth0 is also enabled?
View 1 Replies View RelatedGenerally you can set system clock using [URL]. However, it doesn't supply millisecond precision (it does have nanoseconds, but this isn't working on my system). Is there another way to set system clock, or will I need to write a C program to do it?
View 3 Replies View RelatedWe are in the process of analysing the possibility of migrating our application from HP-UX unix operating system to Linux operating system.
1)In our application, most of the source codes are written in C, C++ languages.
2)We are using aC++ compiler in current HP-UX opertaing system.
3) And also we have 400 shell scripts.
4) Using Oracle 10g database
How can it be determined whether a function defined in some file of an application source-code(meant for multiple operating systems e.g., Linux, AmigaOS) is actually called when the application run on Linux?
View 9 Replies View RelatedAs per my knowledge, one can use systemcall to call the driver functions for example using open, close... Now is there any way to call driver functions directly from application without using system call?
View 4 Replies View RelatedIt is just a general discussion on "How Can Perl Be Useful in System Administration and Application Development on UNIX and Linux Platforms"? I am doing pretty much well with Bash and PHP. In fact, I am learning and experimenting in depth in those two domains. The project that I am working for these days has several scripts which are written in Perl and Ksh. They interact with Ab Initio graphs and perform extensive jobs. Anyways, my current role doesn't require me to have knowledge of Perl but I don't see any harm in learning something new.
So, before I take it, I want to know how Perl can help me and what I can do with it as a UNIX / Linux System Administrator and Application Developer? I just looked at some of its keywords, functions, and commands. Perl Variables are identical to those of PHP. Conditional Statements, Loops, etc. are also much the same as found in any other computer languages. So, at first glance, I have got this feel that it wouldn't be much difficult for me to learn it. But what do you say? Do I really need Perl when I am focusing on PHP and Bash?
I have a projet at university, and i need to install a rootkit or keylogger on the unix operating system, i have searched over the internet and i have found names of rootkits but i couldnt download or get the source code for the rootkit. Does anyone know where to find a rootkit or keylogger to use?
View 5 Replies View RelatedPlease send me the code how to assign ipv6 address using ioctl system call using C.
View 1 Replies View RelatedI am running an embedded Linux Release 2.4.19-uc0.
I have code in several places that calls
reboot(LINUX_REBOOT_CMD_RESTART)
successfully. I need to put it into a new place in a application running on the system. When I do, it seems to just lock up the system and does not return from the call nor leave me able to Telnet in or Ping or anything. I've tried puttingtrace code in to write info out to a file, but that too is not working (as it never returns from the reboot() call.I don't get any error from reboot(), it just does not return and does not appear to restart the system.
I'm working on Linux OS (Suse/redhat) and trying to format a linux partition from a c program. Is there a way to do this without using : 'system ("mkfs.ext4 /dev/sdxy")'
View 4 Replies View RelatedI have logged into one Linux VM and I want to test remote access to another Linux server on the same network but I cannot recall the Linux application to call?
View 10 Replies View RelatedI 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
Is there any way to monitor one process' CPU usage and RAM usage over time on Linux? I am trying to change to a cheaper VPS and need to work out what level of CPU and RAM I need!
View 2 Replies View RelatedI've written a program which creates a directory using the system call mkdir()
How can i execute 'mkdir -v' using this system call? is there another system call to include options?
i have used debugfs command and "open -w /dev/sda1" command, but i did not close it. the file system is in read-only mode now.
View 2 Replies View Relatediam trying to add a system call to the kernel version 2.6.33.7.Iam running fedora 13.I have followed all the steps given in this <hekimian-williams.com/?p=20 -> tutorial,but iam getting a error in make saying undfined reference to mysyscall in syscall_table_32.
View 1 Replies View Relatedin below program why was new_args[0], rather than the reference the_cmd, passed to the execvp system call?
Code:
/*
A _very_ limited shell program
[code]....
Possible Duplicate: Cross-platform file system Can you please tell me what kind of file system can be read by MacOS X, Linux and Windows? And it can create a file greater 4 GB?
View 2 Replies View RelatedI made a modification to the /etc/fstab using Ubuntu 10.04 and now it wont boot correctly. I can get the cli but when I enter /etc/fstab and make an edit it says" changing permission of /etc/fstab: read only file system" This is what I get when the system boots:
PHP Code:
[code]....
so if I choose manual I get to the cli and whenever I attempt to edit the file I get the above error. I used another machine and attempted to mount the drive but I get the same error I added notaime option to my fstab by accident so if I choose manual I get to the cli and whenever I attempt to edit the file I get the above error. I used another machine and attempted to mount the drive but I get the same error. I tried
PHP Code:
[code]...
and I get
PHP Code:
[code]....
How can I mount the partition so that I can edit it?