Find the answer to your Linux question:
Results 1 to 4 of 4
I have several virtual Suse linux servers on a mainframe. As some of you know (and have helped with) I have been doing some scripting work to simplify the db ...
  1. #1
    Linux Newbie
    Join Date
    Jun 2006
    Posts
    139

    Weird directory problem

    I have several virtual Suse linux servers on a mainframe. As some of you know (and have helped with) I have been doing some scripting work to simplify the db admins job.
    I have gotten the script to work on my test box and move/copy it to a production test box. Simple right??......WRONG. I copied everything and only made a change in the server name when su ing to them.
    The script got the error "not a file or directory "
    So I compare the 2 no diff(except for the names which are correct) .
    I then try an experiment. I go to each server and type the cd command to get to the sqllib and they both work and db2profile is where it should be..humm weird. So I look again don't see the problem, logout log back in and cd to EACH directory. BAM found a problem.
    On the server that is working when I cd to each direrctory each on shows on the command line(ie /home/server1/sqllib/db2profile) again 1 at a time.
    BUT when I do it on my trouble child I get:
    /home..it shows
    /server2..IT DOES NOT SHOW(it is a blank)
    /sqllib.. I see sqllib but not the entire path
    So how do I fix this??

    thanks
    Mace

  2. #2
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,105
    Change directories to /home

    do a "ls -l"

    do you see a server2 directory?

    Be sure of your capitalization remember that Linux is case sensitive.

  3. #3
    Linux Newbie
    Join Date
    Jun 2006
    Posts
    139
    Yes I see the server2 directory.
    The directory is there ..here is a better example ;
    server2user@server2:/home cd user2dir(which is found by doing an ls)
    THE NEXT DISPLAY IS:
    server2user@server2:~> with no /home directory shown
    then I go to sqllib(where the db2profile executable is) I get
    server2user@server2:~/sqllib> and an ls at all the stops show up correctly

    thanks
    Mace

  4. #4
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,105
    The ~ character is shorthand for the /home/currentuser directory

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...