LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-16-2004, 01:40 AM   #1
wuzhong
LQ Newbie
 
Registered: Aug 2004
Posts: 17

Rep: Reputation: 0
How can I get the "current work dir" using C function?


I mean to get the information as the echo of command "pwd"

thanks!!
 
Old 09-16-2004, 01:53 AM   #2
sether
Member
 
Registered: Aug 2004
Posts: 695

Rep: Reputation: 31
i don't really understand the question. do you want to know the working directory without having to type "pwd"? i mean do you want it to just be displayed like this:

/home/user>
 
Old 09-16-2004, 02:01 AM   #3
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
Moved: This thread is more suitable in Programming and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 09-16-2004, 02:09 AM   #4
mirradric
Member
 
Registered: May 2004
Location: Singapore
Distribution: Debian woody and debian sarge
Posts: 188

Rep: Reputation: 31
Code:
man getcwd
it a obvious place to look
 
Old 09-16-2004, 06:44 AM   #5
wuzhong
LQ Newbie
 
Registered: Aug 2004
Posts: 17

Original Poster
Rep: Reputation: 0
yes
 
Old 09-16-2004, 06:47 AM   #6
wuzhong
LQ Newbie
 
Registered: Aug 2004
Posts: 17

Original Poster
Rep: Reputation: 0
thanks!!
 
  


Reply



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
Replacing "function(x)" with "x" using sed/awk/smth Griffon26 Linux - General 3 11-22-2006 10:47 AM
When "function pointer" meets "template"... I can't get rid of this compiling er cyu021 Linux - Software 3 12-17-2004 07:52 PM
"<" ">" Keyboard keys on Toshiba Satellite 1005-s157 dont work RodCas Linux - Laptop and Netbook 1 05-08-2004 04:22 PM
"Function not implemented" error in call to "sem_open()" Krishnendu8 Linux - Newbie 1 06-07-2003 02:52 AM
"Function not imlemented" error in call to "sem_open()" Krishnendu8 Linux - Networking 0 06-07-2003 02:19 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:29 PM.

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
Open Source Consulting | Domain Registration