writing your own command in unix/linux


 
Thread Tools Search this Thread
Top Forums Programming writing your own command in unix/linux
# 1  
Old 03-15-2007
writing your own command in unix/linux

Hi

I am very new to Linux programming,otherwise I have exposure to Linux. Was thinking about something like writing my own commands for Linux. Any ideas where to start, any useful links and what I need to know before I start with this.

Thanks Smilie
Sidhu
# 2  
Old 03-15-2007
By command do you mean implementing something like the 'cp' or the 'ls' command? Or do you mean command intrepreter - aka shell.
# 3  
Old 03-15-2007
first thing i meant...

ya like implementing ls,cp and such commands .....

thanks
Sidhu
# 4  
Old 03-15-2007
Well, if you want to see how the actual code is written, go to cvs.opensolaris.org. You can browse through code for almost any command there. Else, check the man pages' See Also section. It usually lists the system calls used in the command. Use those system calls to implement the command in your own way.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to use expect and send command in UNIX/Linux?

Hello Everyone, I am executing a unix script which logs into 50+ servers (netapp servers) and runs some commands and captures output locally. Below is the code snippet. file1.txt has names of all the remote servers where I am logging in. #!/bin/ksh #!/usr/bin/expect touch... (1 Reply)
Discussion started by: rahul2662
1 Replies

2. HP-UX

Linux to UNIX command

Hi, I have the below command for Linux find -iname '*.ear' -o -iname '*.war' | xargs grep -R org.apache.log4jWhat is the HP-UX equivalent of this ? (4 Replies)
Discussion started by: mohtashims
4 Replies

3. Linux

Need unix/linux command

Hi, When i ran the command as sar in linux box. i got a output like as below $ sar Linux 2.6.18-274.3.1.el5 (scrbgcddkcph431) 06/29/2012 12:00:01 AM CPU %user %nice %system %iowait %steal %idle 12:10:01 AM all 8.78 0.00 26.11 ... (8 Replies)
Discussion started by: Mani_apr08
8 Replies

4. HP-UX

Writing from Unix DB to Linux NFS

I have an HP Unix server with Oracle DB and want to write Datapumo export files across the network to IMB/Linux NFS. Will that work? (3 Replies)
Discussion started by: Duane McDonough
3 Replies

5. UNIX for Dummies Questions & Answers

install command flag Linux/Unix issue

Hi all, I was trying to install from source USB_ModeSwitch on my Mac. I have always had success with the basic ./configure, make, make install commands in terminal so don't know how, why or what. The issue I came across is that the makefile.conf uses the -D flag while installing and on UNIX... (0 Replies)
Discussion started by: jprokos
0 Replies

6. Shell Programming and Scripting

Stress testing php files at Unix/Linux Command line

Hi, Your great help is very appreciated. I am looking for any Unix command or tool for doing Stress/Load test of php files at command prompt. I tried torture.pl but it is not working after20 concurrent threads/users. as it is very urgent for me..please suggest ur ideas asap. thanks (5 Replies)
Discussion started by: Malleswari
5 Replies

7. UNIX for Dummies Questions & Answers

su command difference between unix and linux

Hello all the su with -l option is running normal with linux but when i try to run it on unix AIX 5.2.7 it's not working with -l option any help (6 Replies)
Discussion started by: islam.said
6 Replies

8. UNIX for Dummies Questions & Answers

How to convert this linux command to Unix AIX?

How to convert this linux command to Unix AIX? I have tried this command and work in CentOS: tail --line=0 --retry -f --follow=name --max-unchanged-stats=1 logFile.log But in AIX, the tail haven't "--retry" "--follow=name" option. Thanks in advance. (1 Reply)
Discussion started by: chris13work
1 Replies

9. What is on Your Mind?

I'm writing a new Linux program!

Yep, that's right. I'm writing a Linux binary that requires an X11 Server. It will also be released in a Shell, Win32, and Cocoa (Mac OS X). It's a program that's a text editor and more. It not just creates TXT and RTF files, it also can save in XML, RSS, and a whole lot of other formats. ... (11 Replies)
Discussion started by: Danny_10
11 Replies

10. UNIX for Advanced & Expert Users

Writing a service in Linux

Hi All: I want to write a program that runs like a service(in the background) and should start up when the system boots. It should always be running, no matter who has logged in, no matter if anybody has logged in et all. Is there any online help i could get on this topic, appreciate the help... (4 Replies)
Discussion started by: preetham
4 Replies
Login or Register to Ask a Question