thanks a lot, but the file that is being redirected isn't recorded in my output file. The system I am using is SunOS 5.8. I tried it on Linux too, but linux didn't recognize the pfiles command at all. Here's my output when I run the 2 lines script on SunOS 5.8:
isn't there another way?
On Solaris 8 the output of pfiles is a bit limited. But still it can be done
You redirected stdout, so FD 1 (File Descriotor 1)
The line shows that FD 1 is related to inode number 156220 which happens to be the inode number for "out.dump"
If you know the exact location (directory) of the file you reirect to you can find out, based on the combination of the output of the commands "pfiles" and "ls -i <dir>", what the name is of the file where your output is directed to.
If you don't know the exact location but at least the the filesystem where to file is located, you can use:
find <root of filesystem> -inum <inode numver as reported by pfiles>
If you have no clue at all wherre the file is located you could use:
find / -inum <inode numver as reported by pfiles>
However in this last scenario more then 1 file could pop up, because on each filesystem there could be a file present with that inode number
Hi,
I have a shell script in which there is a file
conn_$temp
where $temp has the pid of the shell script.
in this shell script i have an embedded awk script that must read the file
while ((getline < "conn_$temp") > 0)
However due to the "$temp" in the file name, the awk script is... (6 Replies)
I have to confirm that an engine was not able to run. In the output below you see that it indeed got errors, but it didn't send those messages to the output file. When I run the same thing with a different executable it works. So does this mean something in the executable could cause it not to... (7 Replies)
I have a question. I am not even sure if it can be done. But if it could be then I would needs a lot of help. ok, I work for a software company and we have a store. The store log files are in a unix server and the log file is dynamically updated everytime some error occurs in the store. So we often... (1 Reply)
I have a file (email) containing email addresses.
I have a second file (terms) that contains simple regular expressions and words/characters. Here are some examples:
\.trainee
\.group
\.web
I want to go through email and delete lines containing the expressions/words from terms and write... (1 Reply)
Hi All,
I am having a script which calculate checks the input feed and perform some function. When i am executing this script i am redirecting this to a output file. I want to know the redirected output file name inside my scripts. Is there is any way to get that .
like the same way we... (4 Replies)
Hi,
GetName()
{
if
then
echo " Please enter the name: "
read Name
tempvar=0
while read line
do
if
then
tempvar=`expr $tempvar + 1`
echo $tempvar
... (10 Replies)
Hi
echo " username "
read username
echo "password"
stty -echo
read password
stty echo
through read i am taking standard input and redirecign them to a file
echo " username=${username}/${password} " > file.lst
now from the same shell script i want to delete the password (i.e... (4 Replies)
Discussion started by: rosheks
4 Replies
LEARN ABOUT FREEBSD
fsdb
FSDB(8) BSD System Manager's Manual FSDB(8)NAME
fsdb -- FFS debugging/editing tool
SYNOPSIS
fsdb [-d] [-f] [-r] fsname
DESCRIPTION
The fsdb utility opens fsname (usually a raw disk partition) and runs a command loop allowing manipulation of the file system's inode data.
You are prompted to enter a command with fsdb (inum X)> where X is the currently selected i-number. The initial selected inode is the root
of the file system (i-number 2). The command processor uses the editline(3) library, so you can use command line editing to reduce typing if
desired. When you exit the command loop, the file system superblock is marked dirty and any buffered blocks are written to the file system.
The following options are available:
-d Enable additional debugging output (which comes primarily from fsck(8)-derived code).
-f Left for historical reasons and has no meaning.
-r Open the file system read/only, and disables all commands that would write to it.
COMMANDS
Besides the built-in editline(3) commands, fsdb supports these commands:
help Print out the list of accepted commands.
inode i-number
Select inode i-number as the new current inode.
back Revert to the previously current inode.
clri i-number
Clear i-number.
lookup name
cd name
Find name in the current directory and make its inode the current inode. Name may be a multi-component name or may begin with slash
to indicate that the root inode should be used to start the lookup. If some component along the pathname is not found, the last
valid directory encountered is left as the active inode. This command is valid only if the starting inode is a directory.
active
print Print out the active inode.
blocks Print out the block list of the active inode. Note that the printout can become long for large files, since all indirect block
pointers will also be printed.
findblk disk_block_number ...
Find the inode(s) owning the specified disk block(s) number(s). Note that these are not absolute disk blocks numbers, but offsets
from the start of the partition.
uplink Increment the active inode's link count.
downlink
Decrement the active inode's link count.
linkcount number
Set the active inode's link count to number.
ls List the current inode's directory entries. This command is valid only if the current inode is a directory.
rm name
del name
Remove the entry name from the current directory inode. This command is valid only if the current inode is a directory.
ln ino name
Create a link to inode ino under the name name in the current directory inode. This command is valid only if the current inode is a
directory.
chinum dirslot inum
Change the i-number in directory entry dirslot to inum.
chname dirslot name
Change the name in directory entry dirslot to name. This command cannot expand a directory entry. You can only rename an entry if
the name will fit into the existing directory slot.
chtype type
Change the type of the current inode to type. Type may be one of: file, dir, socket, or fifo.
chmod mode
Change the mode bits of the current inode to mode. You cannot change the file type with this subcommand; use chtype to do that.
chflags flags
Change the file flags of the current inode to flags.
chown uid
Change the owner of the current inode to uid.
chgrp gid
Change the group of the current inode to gid.
chgen gen
Change the generation number of the current inode to gen.
btime time
mtime time
ctime time
atime time
Change the creation (birth), modification, change, or access time (respectively) on the current inode to time. Time should be in the
format YYYYMMDDHHMMSS[.nsec] where nsec is an optional nanosecond specification. If no nanoseconds are specified, the birthnsec,
mtimensec, ctimensec, or atimensec field will be set to zero. Note that btime is available on UFS2 file systems only.
quit, q, exit, <EOF>
Exit the program.
SEE ALSO editline(3), fs(5), clri(8), fsck(8)HISTORY
The fsdb utility uses the source code for fsck(8) to implement most of the file system manipulation code. The remainder of fsdb first
appeared in NetBSD, written by John T. Kohl.
Peter Wemm ported it to FreeBSD.
BUGS
Manipulation of ``short'' symlinks has no effect. In particular, one should not try changing a symlink's type.
You must specify modes as numbers rather than symbolic names.
There are a bunch of other things that you might want to do which fsdb does not implement.
WARNING
Use this tool with extreme caution--you can damage an FFS file system beyond what fsck(8) can repair.
BSD August 24, 2006 BSD