C/C++ question.How do I find out the users home directory, programmatically?
492207
on most unices, you just need to retrieve the passwd structure for the targetted uid or username, with respectively getpwuid(3) or getpwnam(3).\n\nThe passwd structure is laid out this way:\n\n          struct passwd {\n              char   *pw_name;       /* user name */\n              char   *pw_passwd;     /* user password */\n              uid_t   pw_uid;        /* user ID */\n              gid_t   pw_gid;        /* group ID */\n              char   *pw_gecos;      /* real name */\n              char   *pw_dir;        /* home directory */\n              char   *pw_shell;      /* shell program */\n          };\n\ne.g, to lookup homedir of user 'foo':\n\n   struct passwd *pw;\n   \n   if (!(pw = getpwnam("foo")) {\n      perror("getpwd:");\n      exit(EXIT_FAILURE);\n   }\n\n   fprintf(stdout, "%s's homedir is '%s'&#92;n", \n        pw->pw_name, pw->pw_dir);\n   exit(EXIT_SUCCESS);
633682
type "what is your ip address and your computer's name?"
398454
to find your mac address on a pc running windows...\ngo to the command line and type "ipconfig/all"
971974
On your toolbar click on 'file' and go to properties.  It will tell you there ")
782640
you open yoour shared folder in which would be in c&#92;documents and settings&#92;your username&#92;shared then open your cd drive and drag your files there
920054
if you remember the name of it (go back to the site if you do not), click on Start, and then Search. in the file name spot, put in the name of the file and click search. this will show you the exact location of all files on your computer with that name.
394022
Open folder>\nFile>\nProperties>\nSharing>\nCheck
779480
use a reverse directory or more simply, call them!  You are not doing something illegal are you?
719826
check the C:/Program Files directory and look through all the programs there.  Go to Start>Control Panel> Add or Remove Programs.  Check in the lower right-hand corner of the screen (the system tray) and click on every icon if you don't know what it is.  Go to Start>All Programs and look through there to see if there are any programs you don't recognize.  Open any you can't identify to see what they are.\n\n  I'm pretty sure you'd find the program looking in all of those places.  That was a thorough sweep.  I couldn't imagine where else a program might hide.\n\n  You could also clear internet history in case the program accesses that.
819434
Do we look like directory assistance?\nb
150604
One of the windows feature.It is easy to view user.simply click the shortcut, it automatically search the relative path and open the particular application.The short cut is static changable one.It save the time and reduce the complexity
883790
in the addres bar for ex: type &#92;&#92;pc name&#92;file path&#92; filename.ext. this will work \n\nif this does not work then you have not yet given proper permissions in the security tab next to folder sharing tab in the properties of the folder. \n\nplease check and correct it
65592
You can open a cmd (dos) window in the directory you want to list. Type in the command dir>dir.txt.\nThis will "pipe" the output of the dir (directory) to a file called dir.txt.
933203
yes you can use this syntax\n\n    MKDIR [drive:]path\n    MD [drive:]path\n\n\nmd c:&#92;test\n\nmkdir c:&#92;temp
217196
I'm not a Windows person, so to be conservative I decided\nto provide two variations on this program.  The first only\nuses features provided by ANSI C.  This does NOT give you\nthe ability to extract a numeric set of permissions, but\nthe function"access()" does let you check for R/W/X and\nfile existence.\n\n\n/*\n *  Check for specific permissions on a file\n */\n\n#include <unistd.h>\n#include <stdio.h>\n\nint\nmain(int argc, char* argv[])\n{\n for (int i=1; argv[i]; i++) {\n  if (access(argv[i], R_OK) == 0)\n   printf("File %s exists and has read access&#92;n", argv[i]);\n  else\n   printf("File %s does NOT have read access&#92;n", argv[i]);\n }\n return 0;\n}\n\nSample execution:\n\n $ a.out /etc/passwd /etc/shadow\n File /etc/passwd exists and has read access\n File /etc/shadow does NOT have read access\n\nThis program could be expanded to use the other permission\ntests and print out read/write/execute details. That will\nbe left as an exercise for the reader.\n\n R_OK     Test for read permission.\n W_OK     Test for write permission.\n X_OK     Test for execute or search permission.\n F_OK     Check existence of file\n\nIf your system is Posix compliant (and I think Windows is,\nbut I'm not sure), then you can use the "stat()" function.\nThis version of the program extracts the file permissions\nand prints them in octal format.\n\n\n#include <fcntl.h>\n#include <sys/types.h>\n#include <sys/stat.h>\n#include <stdio.h>\n#include <stdlib.h>\n\nint\nmain(int argc, char* argv[])\n{\n struct stat sbuff;\n\n if (!argv[1])\n  fprintf(stderr, "usage: %s file-to-check&#92;n", argv[0]), exit(-1);\n\n if (stat(argv[1], &sbuff)< 0)\n  fprintf(stderr, "stat(%s) failed&#92;n", argv[1]), exit(-1);\n\n printf("%s &#92;t has mode %12o&#92;n", argv[1], sbuff.st_mode);\n\n return 0;\n}\n\n\nSample execution:\n\n $ cc permis2.c\n $ a.out /etc/passwd\n /etc/passwd      has mode       100644\n $ a.out /etc/shadow\n /etc/shadow      has mode       100400\n\n\nTo interpret these permissions, look at the lower three\ndigits.  /etc/passwd has mode 644, which gives user,\ngroup, and other permissions of RW-, R--, and R--.\n/etc/shadow has mode 400, which gives the corresponding\npermissions of R--, ---, and ---.
83785
if it is windows home edition go to control panel and go to User accounts and do whatever you want
638818
start -> find\n(windowkey+f)\n\nsearch all files and folders\n\nsearch: s*.*