linux redhat 8.0
I am getting accustomed to using the -exec command to get around my databse.. and use it to edit and update files..! is this more apllicable than jumping from one directory to the other.. I have set up the databse so that the inode #'s are accessable and can get me from one... (0 Replies)
im having trouble with the comprehending the exec command and the use of file descriptors.
given:
#!/bin/sh
exec 4>&1
exec 1>&2
exec 2>&4
exec 4>&-
echo Hello
would the standard output of this script be sent to STDOUT, STDERR or neither and why???
thanks for the help. (1 Reply)
i have a script where i am reading some lines from a file into another file..
script works fine in bash..
#!/usr/bin/csh
awk 'NR>20&&NR<32' try.sum | awk '{print $4 }' >io
awk 'NR>20&&NR<32' try.sum | awk '{print $9 }' >io1
awk 'NR>20&&NR<32' try.sum | awk '{print $14 }'>io2
exec 10<io... (1 Reply)
Need to close files which descriptor number are larger than 9 in ksh.
'exec 10>&-' fails with 'ksh: 10: not found'. How do you specify file descriptors which occupies two or more digits in ksh script?
Thanks,
Masaki (2 Replies)
Hi,
I need the data to be appended to the file using exec command in linux.
I am able to add the data to a file using exec command but the file is getting overwritten.
Above exec command is used to overwite in a file.
When I use "exec >>& fileName", getting "syntax error near... (3 Replies)
Hi can some one explain the following command , It would really help if some can really elloborate on what is happening out here
export PATH | exec /bin/sh ./auto_approve :q
P.S: This is the first time i am using exec ,so an elloboration what does it do and what is the use of the :q will be... (1 Reply)
I have a script (ksh, Linux) which is about 500 lines and this is only a small requirement. Below is an example of my requirement.
FunctionThis(){
echo "You are in this. Goes to log"
}
FunctionThat(){
echo "You are in That. Goes to log"
}
FunctionScreen(){
echo "You are in Screen.... (3 Replies)
Hello.
From a script, a command for a test is use :
find /home/user_install -maxdepth 1 -type f -newer /tmp/000_skel_file_deb ! -newer /tmp/000_skel_file_end -name '.bashrc' -o -name '.profile' -o -name '.gtkrc-2.0' -o -name '.i18n' -o -name '.inputrc'
Tha command... (3 Replies)
Discussion started by: jcdole
3 Replies
LEARN ABOUT HPUX
chroot
chroot(2) System Calls Manual chroot(2)NAME
chroot() - change root directory
SYNOPSIS DESCRIPTION
causes the named directory to become the root directory, the starting point for path searches for path names beginning with path points to
a path name naming a directory. The user's working directory is unaffected by the system call.
The entry in the root directory is interpreted to mean the root directory itself. Thus, cannot be used to access files outside the subtree
rooted at the root directory.
Security Restrictions
The effective user ID of the process must be a user with the privilege to change the root directory.
See privileges(5) for more information about privileged access on systems that support fine-grained privileges.
RETURN VALUE
returns the following values:
Successful completion.
Failure.
is set to indicate the error.
ERRORS
fails and the root directory remains unchanged if one or more of the following is true:
Any component of the path name is not a directory.
The named directory does not exist or a component of the
path does not exist.
The effective user
ID is not a user who has the privilege.
path points outside the allocated address space of the process. The reliable detection of this error is implementation
dependent.
The length of the specified path name exceeds
bytes, or the length of a component of the path name exceeds bytes while is in effect.
Too many symbolic links were encountered in translating the path
name.
WARNINGS
Obsolescent Interfaces
is to be obsoleted at a future date.
SEE ALSO chroot(1M), chdir(2), privileges(5).
STANDARDS CONFORMANCE
TO BE OBSOLETED chroot(2)