LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
 
Search this Thread
Old 03-28-2014, 10:18 AM   #1
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 535

Rep: Reputation: 32
How to get the 'user.home' and 'user.dir' with a Linux command?


as titled.
 
Old 03-28-2014, 10:21 AM   #2
schneidz
Senior Member
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 4,441

Rep: Reputation: 708Reputation: 708Reputation: 708Reputation: 708Reputation: 708Reputation: 708Reputation: 708
this question doesnt make much sense but i will assume you mean the users home directory:
Code:
[schneidz@hyper ebay]$ echo $HOME
/home/schneidz
if those are specific files you can just cat them
Code:
[schneidz@hyper ebay]$ touch user.home user.dir
[schneidz@hyper ebay]$ find $HOME -name user.home -o -name user.dir
/home/schneidz/ebay/user.dir
/home/schneidz/ebay/user.home
[schneidz@hyper ebay]$ cat user.home user.dir

Last edited by schneidz; 03-28-2014 at 10:26 AM.
 
Old 03-31-2014, 06:23 AM   #3
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 535

Original Poster
Rep: Reputation: 32
This is not what I want. What I want is: I log in to machine and want to know where is my user.home.
 
Old 03-31-2014, 06:45 AM   #4
pan64
Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 5,843

Rep: Reputation: 1529Reputation: 1529Reputation: 1529Reputation: 1529Reputation: 1529Reputation: 1529Reputation: 1529Reputation: 1529Reputation: 1529Reputation: 1529Reputation: 1529
that is exactly echo $HOME. But actually these expressions (user.home and user.dir) are not general terms in the linux world. Therefore you need to explain what do you really mean by them.
 
Old 03-31-2014, 08:16 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,604

Rep: Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935
Well, then what do you want? What distribution / version are you currently running?

As stated you need to define what you mean by "where is my use.home". I will try to guess and say you want to know what partition /home resides. You can look at the output of the mount command as well as looking at the /etc/fstab file. If /home is not shown then it is part of your / partition.
 
Old 03-31-2014, 11:10 AM   #6
Habitual
Senior Member
 
Registered: Jan 2011
Location: Pelican Bay Correctional
Distribution: I can't wait for Linux to be 'underground' again.
Posts: 3,921
Blog Entries: 1

Rep: Reputation: Disabled
Quote:
Originally Posted by thomas2004ch View Post
This is not what I want. What I want is: I log in to machine and want to know where is my user.home.

Then use something a little more than
Quote:
Originally Posted by thomas2004ch View Post
as titled.
You get out of it what you put into it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Create the new userís home dir in /home thiyagusham Linux - Newbie 8 01-14-2013 04:34 PM
Lock user in home dir JJX Linux - General 9 06-28-2011 02:09 PM
user home dir doesn't create when new user add dev_mohamed Linux - Software 3 01-12-2007 01:08 AM
user home dir/permissions xilace Linux - Security 5 07-21-2004 12:33 PM
recover user and home dir powadha Linux - General 5 04-16-2004 09:08 AM


All times are GMT -5. The time now is 04:32 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration