Sponsored Content
Top Forums UNIX for Dummies Questions & Answers previous,next command in unix Post 302135618 by namishtiwari on Tuesday 11th of September 2007 02:59:40 AM
Old 09-11-2007
put set -o vi on the command prompt or in your profile file.

then press esc and k to navigate the commands.In Bash you can do that without setting anything like set -o vi. up and down arrow works in that to navigate between commands.


Thanks
Namish
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Capturing previous date in UNIX

Hi All, Hope you can help me out here...This is what I'm doing: % date '+%y.%m.%d' 05.03.05 How can I tweak this so that it gives me the PREVIOUS date, more specifically: 05.03.04 Hope you all can help. Thanks!!! Vince (3 Replies)
Discussion started by: tomeldan
3 Replies

2. UNIX for Dummies Questions & Answers

getting the previous command

Hello all I'm on SunOS5.9 and I'm trying to make the arrow keys work as in DOS ..get the previous command , etc .. I searched this site and got an answer. I pasted the following code to my .kshrc file in my home directory...It still does not seem to work ...Am I missing anything here ? I'm... (5 Replies)
Discussion started by: luft
5 Replies

3. UNIX for Dummies Questions & Answers

Seeing previous command

Guys, In work we have just gotten a new HP 9000 server and I'm trying to set it up so that if I press <Up arrow> key I can see the command I typed in last(and press enter to run it again). Can anyone advise how to set this up. One friend suggested I touch a file called .toucheditXXXX (I cant... (4 Replies)
Discussion started by: JackieChan
4 Replies

4. UNIX for Advanced & Expert Users

Previous Command

We have a Solaris Server and I am acessing it through telnet to run various commands for my data validation like GREP, SED, AWK etc. My requirement is how do i use the previous command that was executed. I tried the option 'ESC' and then 'k'. It displays the characters like '^[[A' etc. How do I... (0 Replies)
Discussion started by: vskr72
0 Replies

5. Shell Programming and Scripting

Previous Command

We have a Solaris Server and I am acessing it through telnet to run various commands for my data validation like GREP, SED, AWK etc. My requirement is how do i use the previous command that was executed. I tried the option 'ESC' and then 'k'. It displays the characters like '^[[A' etc. How do I... (1 Reply)
Discussion started by: vskr72
1 Replies

6. UNIX for Dummies Questions & Answers

Previous Command

We have a Solaris Server and I am acessing it through telnet to run various commands for my data validation like GREP, SED, AWK etc. My requirement is how do i use the previous command that was executed. I tried the option 'ESC' and then 'k'. It displays the characters like '^[[A' etc. How do I... (2 Replies)
Discussion started by: vskr72
2 Replies

7. HP-UX

Previous command

Hi, i would like to retrieve (only retrieve, not execute) a previous command which i executed on the command prompt. I tried the 'up arrow' key, but its not working. Instead,it showed me some funny characters. I searched around and i found the way to do it was using the way below. Several... (5 Replies)
Discussion started by: new2ss
5 Replies

8. UNIX for Dummies Questions & Answers

Repeat previous unix command

Hi all, Is there a way to bring back the previous unix command without retyping? I tried the "arror up" key, and it seems not working (sun solaris). What is the correct way? Thanks! (4 Replies)
Discussion started by: syang68
4 Replies

9. UNIX for Dummies Questions & Answers

Command to print previous year in UNIX

hi all, I use date +%Y which gives Current year. Requirement: I want previous year to be printed. Please help me. Note: I tried date +%d/%m/%Y -d "-1 years" which is not working. (10 Replies)
Discussion started by: wasim999
10 Replies

10. Shell Programming and Scripting

How to execute previous command in UNIX?

Hi, I was able to use !! on the console. But when I used !! in the run.sh, it says something like command not found. (3 Replies)
Discussion started by: alvinoo
3 Replies
FSTAT(8)						      System Manager's Manual							  FSTAT(8)

NAME
fstat - file status SYNOPSIS
fstat [ -u user ] [ -p pid ] [ filename... ] DESCRIPTION
Fstat identifies open files. A file is considered open if a process has it open, if it is the working directory for a process, or if it is an active pure text file. If no options are specified, fstat reports on all open files. Options: -u Report all files open by a specified user. -p Report all files open by a specified process id. filename... Restrict reports to the specified files. If the file is a block special file, fstat additionally reports on any open files on that device, treating it as a mounted file system. The following fields are printed USER The username of the owner of the process. CMD The command name of the process. PID The process id. FD The file number in the per-process open file table. The special names "text" and "wd" mean that the file is the pure text inode or the working directory for the process. If the file number is followed by an asterick (*), then the file is not an inode, but either a socket, fifo, or has an error of some kind. In this case the rest of the entry is variable format, doesn't correspond to the rest of the headings, and is enclosed in parenthesis. The following paragraph describing sockets will explain the variable format. DEVICE Major minor number of the device this file exists on. INODE The inode number of the file. SIZE The size in bytes of the file. TYPE The type of the file. (see sys/file.h) Sockets The formating of open sockets depends on the protocol domain. In all cases the first field is the domain name, the second field is the socket type (stream, dgram, etc), and the third is the socket flags field (in hex). The remaining fields are protocol dependent. For tcp, it is the address of the tcpcb, and for udp, the inpcb (socket pcb). For unix domain sockets, its the address of the socket pcb and the address of the connected pcb (if connected). Otherwise the protocol number and address of the socket itself are printed. The idea is not to duplicate netstat, but to make available enough information for further analysis. For example, the addresses mentioned above are the addresses which the "netstat -A" command would print for tcp, udp, and unixdomain. Note that since pipe(2) is implemented with sock- ets, a pipe appears as a connected unix domain stream socket. A unidirectional unix domain socket indicates the direction of flow with an arrow ("<-" or "->"), and a full duplex socket shows a double arrow ("<->"). BUGS
Socket information clutters the output. Since fstat takes a snapshot of the system, it is only correct for a very short period of time. SEE ALSO
ps(1), pstat(8) 4th Berkeley Distribution December 12, 1987 FSTAT(8)
All times are GMT -4. The time now is 08:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy