Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Unix .profile file

Posted on 2011-03-03
10
725 Views
Last Modified: 2013-12-05
A colleague has advised me...
"In your .profile, define the following"

So, I need to find and open my .profile file.

I have CRT and Secure FTP access to the server from a Windows computer.

Using CRT, I can use VI as an editor (but I'm not so great at it).

Where is my .profile and how do I open it?

Thanks,

Geoff
0
Comment
Question by:gswitz
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
ID: 35031355
Hi,

its in your home directory.

There is a shell variable $HOME containing the path to your home directory, and there is also a shortcut "~".

So either use

vi $HOME/.profile

or

vi ~/.profile


wmp
0
 
LVL 68

Expert Comment

by:woolmilkporc
ID: 35031373
Here is a short "vi" tutorial:

http://www.eng.hawaii.edu/Tutor/vi.html

0
 

Author Comment

by:gswitz
ID: 35031759
I cannot see this file using the FTP Client. Is this typical?
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 68

Expert Comment

by:woolmilkporc
ID: 35031837
Yes,

this could be because it starts with a dot (kind of a hidden file).

What is your ftp client?

Anyway, on a terminal you should see it with

ls -la
0
 
LVL 14

Expert Comment

by:mikelfritz
ID: 35032472
can you use ssh instead?
0
 
LVL 14

Expert Comment

by:mikelfritz
ID: 35032482
you should see the file if you cd to your home dir and then issue "ls -al"
0
 
LVL 6

Expert Comment

by:Tomunique
ID: 35035974
It may be that you don't have one.  as most ftp clients should show dot files.
but if you issue the vi commands as woolmilk specified, even if it doesn't exist, it will created it.

If you are using an ftp client, and are downloading it to your windows box.. then you don't need VI.  just use notepad or whatever on Windows.

Now, critical here... IF YOU EDIT ON WINDOWS... ensure you transfer the file back and forth using the ASCII option (generally just type ascii at the ftp client command prompt, or in some transfer option window) within FTP otherwise you'll be opening more questions wondering why there's ^M characters in your file, and your settings in .profile don't work right.


0
 
LVL 14

Expert Comment

by:mikelfritz
ID: 35040527
And if you do see the ^M in the file on SCO you can use "dtox" to fix it.
0
 
LVL 14

Expert Comment

by:mikelfritz
ID: 35040597
SCO's built in client won't show the "." files with a plain "dir", issuing "dir .profile" does show it.  And you can do get's and put's of "." files...

The profile that a user uses depends on the shell they use.  For instance, sh uses .profile, csh uses .cshrc, ksh uses .kshrc

You could look at /etc/passwd to see what shell the user is set to.  An example is mine set for ksh:

mpope1:x:220:50::/usr/mpope1:/bin/ksh

0
 

Author Closing Comment

by:gswitz
ID: 35056166
Thanks.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question