Article View: es.comp.os.linux.programacion
Article #16523Re: PWD
From: ferkys
Date: Fri, 14 Apr 2000 00:00
Date: Fri, 14 Apr 2000 00:00
31 lines
1293 bytes
1293 bytes
En es.comp.os.linux.programacion J.A. Gutierrez ezpuzo:
>webmaster MTG <webmaster@mtgsystem.com> wrote:
>: Alguien sabe c�mo obtener el directorio home del usuario actual o de
>: cualquier otro usuario desde C ?
>
>pwd = getpwuid ( getuid () )
>home = pwd->pw_dir;
>
>
otra solucion:
char *dir;
/*asignamos memoria y todas las leches esas*/
dir = getenv("$HOME");
saludete.
--
'''
ICQ:#51601802 (o o) ferkys@retemail.es
==============ooO(_)Ooo============
http://www.clickeas.com/linux
Debian Linux 2.2.13
.oooO Oooo.
===========( )====( )==========
\ ( ) /
\_) (_/
Technical Details
Message-ID:
<slrn8ff2up.tv.ferkys@ferkys.pcferk.es>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<38F6FFF9.1110E578@mtgsystem.com> <8d71ho$71h$2@news.unizar.es>Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII X-Google-Thread: f86c8,adc6ed5cfcc3b77d X-Google-Attributes: gidf86c8,public From: ferkys@quitaestoporfavor-retemail.es (ferkys) Subject: Re: PWD Date: 2000/04/14 Message-ID: <slrn8ff2up.tv.ferkys@ferkys.pcferk.es> X-Deja-AN: 611271242 Content-Transfer-Encoding: 8bit References: <38F6FFF9.1110E578@mtgsystem.com> <8d71ho$71h$2@news.unizar.es> Content-Type: text/plain; charset=iso-8859-1 Organization: Iddeo - Retevisi�n Mime-Version: 1.0 User-Agent: slrn/0.9.6.2 (Linux) Reply-To: ferkys@QUITALOretemail.es Newsgroups: es.comp.os.linux.programacion