VI command not working


 
Thread Tools Search this Thread
Operating Systems AIX VI command not working
# 15  
Old 01-03-2018
I had seen that too, but am able to write to the directory with no issue.

Code:
patloradb01a:/home/prices02 >$ls -ld /var/tmp
drwxrwxrwt    3 bin      bin            4096 Jan 03 06:53 /var/tmp

# 16  
Old 01-03-2018
Shouldn't libcurses be executable?

Code:
-r--r--r--    1 bin      bin         1751983 Mar 07 2014  /usr/lib/libcurses.a

# 17  
Old 01-03-2018
Is one of your file systems full?
Code:
df -k /var/tmp /home/prices02 /tmp

# 18  
Old 01-03-2018
Quote:
Originally Posted by RudiC
Shouldn't libcurses be executable?

Code:
-r--r--r--    1 bin      bin         1751983 Mar 07 2014  /usr/lib/libcurses.a

I had thought that too, but the other passive node in the cluster has the same permissions, and it's working just fine.

---------- Post updated at 08:12 AM ---------- Previous update was at 08:11 AM ----------

Quote:
Originally Posted by Scrutinizer
Is one of your file systems full?
Code:
df -k /var/tmp /home/prices02 /tmp

Nope, all filesystems are good

Code:
patloradb01a:/home/prices02 >$df -k /var/tmp /home/prices02 /tmp
Filesystem    1024-blocks      Free %Used    Iused %Iused Mounted on
/dev/hd9var       6291456   4984848   21%     7368     1% /var
/dev/hd1          2097152   1868488   11%     1621     1% /home
/dev/hd3         10485760   6617744   37%     6193     1% /tmp
patloradb01a:/home/prices02 >$

# 19  
Old 01-03-2018
You have truss output for a failure. Please generate one for success on another machine.
Do you see the point in the truss output where the two diverge? i.e., problem one has an error return from a syscall, the other does not.

This has some assumptions that might be wrong, but it is worth a try.
# 20  
Old 01-03-2018
Thanks Jim, I'll go and check the truss on another system and see what we get.

For now since it was giving errors for /var/tmp, I've created an .exrc file to point the temp directory to my home

Code:
patloradb01a:/home/prices02 >$cat .exrc
set dir=/home/prices02

Now when I run a truss it looks like the file is fine, but there seems to be an issue with it passing controls to the kernel.
I'm going to have to go and read up on truss, I'm not a programmer, so a lot of this is lost on me at the moment.

Code:
patloradb01a:/home/prices02 >$truss vi test.txt
execve("/usr/bin/vi", 0x2FF22C20, 0x200138A8)    argc: 2
read_sysconfig(0xF07E4660, 0x00000010, 0xFFFFFFFC, 0x10000000, 0x300006DC, 0x00000080, 0x06010000, 0xF08564C0) = 0x00000000
kioctl(2, 22528, 0x00000000, 0x00000000)        = 0
kioctl(2, 21505, 0x300068C8, 0x00000000)        = 0
sbrk(0x00000000)                                = 0x305CA7DC
vmgetinfo(0x2FF21550, 7, 16)                    = 0
sbrk(0x00000000)                                = 0x305CA7DC
sbrk(0x00000004)                                = 0x305CA7DC
__libc_sbrk(0x00000000)                         = 0x305CA7E0
getuidx(4)                                      = 705
getuidx(2)                                      = 705
getuidx(1)                                      = 705
getgidx(4)                                      = 50
getgidx(2)                                      = 50
getgidx(1)                                      = 50
__loadx(0x01480080, 0x2FF20F30, 0x00000A50, 0x2FF21A90, 0x00000000) = 0xD056C128
__loadx(0x01480180, 0x2FF20F30, 0x00000A50, 0xF07DA150, 0xF07DA080) = 0xF08C7400
__loadx(0x07080000, 0xF07DA120, 0xFFFFFFFF, 0xF08C7400, 0x0001F0B0) = 0xF08C83AC
__loadx(0x07080000, 0xF07DA060, 0xFFFFFFFF, 0xF08C7400, 0x0001F0B0) = 0xF08C83B8
__loadx(0x07080000, 0xF07DA130, 0xFFFFFFFF, 0xF08C7400, 0x0001F0B0) = 0xF08C83E8
__loadx(0x07080000, 0xF07DA070, 0xFFFFFFFF, 0xF08C7400, 0x0001F0B0) = 0xF08C83F4
__loadx(0x07080000, 0xF07DA0F0, 0xFFFFFFFF, 0xF08C7400, 0x0001F0B0) = 0xF08C83C4
__loadx(0x07080000, 0xF07DA090, 0xFFFFFFFF, 0xF08C7400, 0x0001F0B0) = 0xF08C83DC
__loadx(0x07080000, 0xF07DA100, 0xFFFFFFFF, 0xF08C7400, 0x0001F0B0) = 0xF08C8400
__loadx(0x07080000, 0xF07DA110, 0xFFFFFFFF, 0xF08C7400, 0x0001F0B0) = 0xF08C8430
__loadx(0x07080000, 0xF07DA0A0, 0xFFFFFFFF, 0xF08C7400, 0x0001F0B0) = 0xF08C8418
__loadx(0x07080000, 0xF07DA0B0, 0xFFFFFFFF, 0xF08C7400, 0x0001F0B0) = 0xF08C8490
getuidx(4)                                      = 705
getuidx(2)                                      = 705
getuidx(1)                                      = 705
getgidx(4)                                      = 50
getgidx(2)                                      = 50
getgidx(1)                                      = 50
__loadx(0x01480080, 0x2FF20F30, 0x00000A50, 0x2FF21A90, 0x00000000) = 0xD056C128
getuidx(4)                                      = 705
getuidx(2)                                      = 705
getuidx(1)                                      = 705
getgidx(4)                                      = 50
getgidx(2)                                      = 50
getgidx(1)                                      = 50
__loadx(0x01480080, 0x2FF20F30, 0x00000A50, 0x2FF21A90, 0x00000000) = 0xD056C128
getuidx(4)                                      = 705
getuidx(2)                                      = 705
getuidx(1)                                      = 705
getgidx(4)                                      = 50
getgidx(2)                                      = 50
getgidx(1)                                      = 50
__loadx(0x01480080, 0x2FF20F30, 0x00000A50, 0x2FF21A90, 0x00000000) = 0xD056C128
getuidx(4)                                      = 705
getuidx(2)                                      = 705
getuidx(1)                                      = 705
getgidx(4)                                      = 50
getgidx(2)                                      = 50
getgidx(1)                                      = 50
__loadx(0x01480080, 0x2FF20F30, 0x00000A50, 0x2FF21A90, 0x00000000) = 0xD056C128
getuidx(4)                                      = 705
getuidx(2)                                      = 705
getuidx(1)                                      = 705
getgidx(4)                                      = 50
getgidx(2)                                      = 50
getgidx(1)                                      = 50
__loadx(0x01480080, 0x2FF20F30, 0x00000A50, 0x2FF21A90, 0x00000000) = 0xD056C128
access("/usr/lib/nls/msg/en_US/ex.cat", 0)      = 0
_getpid()                                       = 31588562
_getpid()                                       = 31588562
_sigaction(30, 0x2FF22250, 0x2FF22260)          = 0
_sigaction(1, 0x2FF22250, 0x2FF22260)           = 0
_sigaction(1, 0x2FF22250, 0x2FF22260)           = 0
_sigaction(3, 0x2FF22250, 0x2FF22260)           = 0
_sigaction(2, 0x2FF22250, 0x2FF22260)           = 0
_sigaction(15, 0x2FF22250, 0x2FF22260)          = 0
_sigaction(4, 0x2FF22250, 0x2FF22260)           = 0
_sigaction(5, 0x2FF22250, 0x2FF22260)           = 0
_sigaction(6, 0x2FF22250, 0x2FF22260)           = 0
_sigaction(8, 0x2FF22250, 0x2FF22260)           = 0
_sigaction(10, 0x2FF22250, 0x2FF22260)          = 0
_sigaction(11, 0x2FF22250, 0x2FF22260)          = 0
_sigaction(13, 0x2FF22250, 0x2FF22260)          = 0
kioctl(0, 22528, 0x00000000, 0x00000000)        = 0
_sigaction(18, 0x2FF22250, 0x2FF22260)          = 0
_sigaction(18, 0x2FF22250, 0x2FF22260)          = 0
__ksetjmp(0x30412E50, 0xD056C619, 2, 0x30412EB4, 0x2FF22B80, 0x28228202, 0x30005CA4, 0xD0187128) = 0
_sigaction(2, 0x2FF22210, 0x2FF22220)           = 0
_sigaction(18, 0x2FF22210, 0x2FF22220)          = 0
kioctl(2, 22528, 0x00000000, 0x00000000)        = 0
kioctl(2, 21505, 0x300068C8, 0x00000000)        = 0
access("/usr/lib/nls/msg/en_US/setupterm.cat", 0) = 0
_getpid()                                       = 31588562
kopen("/usr/share/lib/terminfo/x/xterm", O_RDONLY) = 3
kioctl(2, 21509, 0xF050BF66, 0x00000000)        = 0
kread(3, "1A011C\0 %\0 !\0 ▒01 G05".., 4096)    = 2417
close(3)                                        = 0
kioctl(2, 1074295912, 0x2FF21C30, 0x00000000)   = 0
kioctl(2, 1074295912, 0x2FF21C30, 0x00000000)   = 0
kioctl(2, 21511, 0xF050BF78, 0x00000000)        = 0
kioctl(2, 1074033788, 0xF050BF94, 0x00000000)   = 0
kioctl(2, 21511, 0xF050BF66, 0x00000000)        = 0
kioctl(0, 1074295912, 0x2FF221D0, 0x00000000)   = 0
kioctl(2, 1074033664, 0x30014AA8, 0x00000000)   = 0
kioctl(1, 22528, 0x00000000, 0x00000000)        = 0
kioctl(2, 22528, 0x00000000, 0x00000000)        = 0
kioctl(2, 21505, 0x300068C8, 0x00000000)        = 0
kopen("/home/prices02/.exrc", O_RDONLY)         = 3
kioctl(3, 22528, 0x00000000, 0x00000000)        Err#25 ENOTTY
kioctl(3, 22528, 0x00000000, 0x00000000)        Err#25 ENOTTY
kread(3, " s e t   d i r = / h o m".., 4096)    = 23
kread(3, " s e t   d i r = / h o m".., 4096)    = 0
__libc_sbrk(0x00000000)                         = 0x305DA7F0
__ksetjmp(0x30412E50, 0x300067CC, 2, 0x30412EB4, 0x2FF22B80, 0x24222202, 0x30005CA4, 0xD0187128) = 0
statx("/home/prices02/.exrc", 0x2FF22110, 176, 020) = 0
statx(".exrc", 0x2FF221C0, 176, 020)            = 0
statx("/home/prices02/.exrc", 0x2FF22200, 76, 0) = 0
getuidx(1)                                      = 705
_sigaction(2, 0x2FF220D0, 0x2FF220E0)           = 0
kfcntl(0, F_DUPFD, 0x00000000)                  = 4
close(0)                                        = 0
kopen("/home/prices02/.exrc", O_RDONLY)         = 0
kioctl(0, 22528, 0x00000000, 0x00000000)        Err#25 ENOTTY
_sigaction(2, 0x2FF22090, 0x2FF220A0)           = 0
_sigaction(18, 0x2FF22090, 0x2FF220A0)          = 0
__ksetjmp(0x30412E50, 0x00000000, 2, 0x30412EB4, 0x2FF22280, 0x22222202, 0x30005CA4, 0xD0187128) = 0
kwrite(1, "1B [ ? 1 0 4 9 l", 8)         = 8
kioctl(2, 21511, 0xF050BF66, 0x00000000)        = 0
unlink("/home/prices02/Ex88562")                = 0
kwrite(1, "1B [ J", 3)                                = 3
kwrite(1, "1B [ ? 1 2 l1B [ ? 2 5 h", 12)     = 12
kfcntl(1, F_GETFL, 0x00000000)                  = 67110914
kfcntl(2, F_GETFL, 0x2FF22FFC)                  = 67110914
_exit(1)

# 21  
Old 01-03-2018
okay.
Code:
kopen("/var/tmp/Ex50270", O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR) = 3
close(3)                                        = 0
kopen("/var/tmp/Ex50270", O_RDWR)               Err#13 EACCES

What this code does:
call creat() to open a new file, which returns 3 == okay
call close on 3, which is okay.
finally it tries to open the newly created file for read write and fails.
This file is the temporary workfile, and does not have anything to do with .exrc

I am guessing something weird has happened in /var/tmp. I would guess there are Exnnnnn files there with bad file attributes - the files should all be cleaned up when vi (or any other editor ) exits.

Try setting the TMPDIR variable for a user with the problem - my assumption here is that /tmp is truly a separate directory object from /var/tmp. Correct me if I'm wrong -
like tmp is a symlink to /var/tmp (I do not know AIX, except that it has tricked me in the the past.)
Code:
export TMPDIR=/tmp

Then try vi. If it works then - /var/tmp and friends have an issue.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Execute ssh command with additional terminal command to any remote user not working script

Hello i am having an issue with bash script and this is the code now=$(cat hosts1.txt | awk '{print $2;}') while read n ;do ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers' When i execute only part with cat, it... (8 Replies)
Discussion started by: tomislav91
8 Replies

2. UNIX for Dummies Questions & Answers

Shell script not working but command works in command prompt

Hi everyone I have a problem with my script If I try directly this command /usr/bin/nice -n 19 mysqldump -u root --password="******" wiki_schneider -c | nice -n 19 gzip -9 > /point_de_montage/$(date '+%Y%m%d')-wiki-db.sql.gz It works But if I simply add this command in a script and... (8 Replies)
Discussion started by: picemma
8 Replies

3. Shell Programming and Scripting

Maxdepth command not working in AIX.Need alternative solution for this command

Hi All, I am trying to select 30 days older files under current directory ,but not from subdirectory using below command. find <Dir> -type f -mtime + 30 This command selecting all the files from current directory and also from sub directory . I read some documention through internet ,... (1 Reply)
Discussion started by: kommineni
1 Replies

4. Shell Programming and Scripting

Working of command

What does the command do lpr -Pqpr *.jpg do ? (1 Reply)
Discussion started by: Nabeel Nazir
1 Replies

5. Shell Programming and Scripting

help with shell script: cp command not working, but mv command works...

Hello. I would like to ask your help regarding the cp command. We are using a cp command to create a back-up copy of our file but to no avail. It's just not working. We already checked the file and directory permissions and all seems correct. We have a script (ftp.script) which calls on... (1 Reply)
Discussion started by: udelalv
1 Replies

6. Shell Programming and Scripting

Need help! command working ok when executed in command line, but fails when run inside a script!

Hi everyone, when executing this command in unix: echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error. here is content of my script: tdbsrvr$ vi hc.sh "hc.sh" 22 lines, 509... (4 Replies)
Discussion started by: 4dirk1
4 Replies

7. UNIX for Advanced & Expert Users

command for recently modified files - "find" command not working

I have three files a.txt , b.txt , c.txt in a directory called my_dir1 .These files were created before two or three months . I have a tar file called my_tar1.tar which contains three files a.txt , b.txt , d.txt . Somebody untarred the my_tar1.tar into my_dir1 directory. So existing two files were... (1 Reply)
Discussion started by: joe.mani
1 Replies

8. Shell Programming and Scripting

cp command not working

Hi Guys, I have about 12000 files in a folder and I want to copy these to another folder. I am using the cp command to do this but it errors out saying cp -- argument list too long. Is there any way to get around this? I don't want to do a mv but use only cp. Thanks (9 Replies)
Discussion started by: npatwardhan
9 Replies

9. Solaris

ls command not working

Hi, I have installed opensolaris 10 in VMware. Everything is fine except ls command is not working. It is not displaying any files and directories. Sorry if the question is soo trivial. (8 Replies)
Discussion started by: mayahari
8 Replies

10. Solaris

last command not working

I have a Solaris 8 Ultra 1 on my network that we use as a utility server. The last command, which looks in the /var/adm/wtmpx file, is not working. When I do a last, the latest entry is dated June 3, but the /var/adm/wtmpx file is dated whenever a login is successful (verified by typing a... (3 Replies)
Discussion started by: antalexi
3 Replies
Login or Register to Ask a Question