03-05-2018
Two generic (non- HP-UX- specific) comments:
- why the -exec ls -l action for find? You want file names, not a "long listing". Try dropping entirely.
- Does emoaigin have write access to /root - would be somewhat unusual.
Last edited by RudiC; 03-05-2018 at 08:24 AM..
This User Gave Thanks to RudiC For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I would like to back up several directories weekly using a cronjob.
I'm not experienced in UNIX, but I would start like this:
tar -cvf backup.tar dir1 dir2 dir3
Now if a file is being modified in the process it will result in an error.
How can I prevent this from happening and how can I... (5 Replies)
Discussion started by: jamesbond
5 Replies
2. UNIX for Dummies Questions & Answers
Say I want to transfer several dump files from a Solaris machine onto a Win2k machine for storage. It was suggested that I tar and gzip the dump files before doing so.
Is it completely necessary to use both of these utilities, or is it sufficient to compress multiple dump files into one gzip... (4 Replies)
Discussion started by: PSC
4 Replies
3. Shell Programming and Scripting
Hi,
I am facing a weired problem in my FTP script. I want to transfer multiple files from remote server to local server everyday, using mget * in my script. I also, want to send an email for successful or failed FTP. My script works for file transfer, but it don't send any mail. There is... (2 Replies)
Discussion started by: berlin_germany
2 Replies
4. UNIX for Dummies Questions & Answers
dears,
I have a folder containing huge no. of files, some of them are created on AUG 16, AUG 17 and AUG 18, for example.
All I want to do is tarring all the files created on a certain date, say AUG 18, in one tar file, only in one command line.
So, how to feed all the files created on a certain... (4 Replies)
Discussion started by: marwan
4 Replies
5. Shell Programming and Scripting
hi guys,
i'm totally new with Unix sripting and no idea how to do the scripting at all. My problem is that my boss asked me to do this:
1.) create a script that will tar or gzip the files in particular directory
eg:
i'm on my home directory and I need to tar/gzip the file in.. assuming... (1 Reply)
Discussion started by: montski
1 Replies
6. Shell Programming and Scripting
HI All,
Im encountering behaviour that is not correct for my requirements when I untar a file.
Im using the below command to tar up files from various folders to the ARCHIVE folder as below...
tar -cvf "$ARCHIVE_PATH"/"$dte_tar_filename" "$LOG_PATH" "$PROCESSED_PATH2" "$ERROR_PATH"
... (5 Replies)
Discussion started by: satnamx
5 Replies
7. UNIX for Dummies Questions & Answers
Hi I need help in tarring files up to four days old. I have been doing this:
find . -mtime -4|xargs tar -cvf mar4.tar
However, it seems like it's tarring everything but leaving those that are 4 days old and newer (which I want tarred and everything else not)
---------- Post updated at... (1 Reply)
Discussion started by: MIA651
1 Replies
8. Solaris
Hi,
I am trying to automate the process of fetching files from remote server to local server through sftp. I have the username and password for the remote solaris server. But I need to give password manually everytime i run the script.
Can anyone help me in automating the script such that it... (3 Replies)
Discussion started by: ssk250
3 Replies
9. Shell Programming and Scripting
Hi All
I need to transfer a file from a UNIX server to a windows server.
I saw that it is possible to do this using scp command by looking at the forum listed below:
... (2 Replies)
Discussion started by: vx04
2 Replies
10. Shell Programming and Scripting
I have a script, which connecting to remote server and first checks, if the files are there by timestamp. If not I want the script exit without error. Below is a code
TARFILE=${NAME}.tar
TARGZFILE=${NAME}.tar.gz
ssh ${DESTSERVNAME} 'cd /export/home/iciprod/download/let/monthly;... (3 Replies)
Discussion started by: digioleg54
3 Replies
LEARN ABOUT SUSE
pivot_root
PIVOT_ROOT(8) Maintenance Commands PIVOT_ROOT(8)
NAME
pivot_root - change the root file system
SYNOPSIS
pivot_root new_root put_old
DESCRIPTION
pivot_root moves the root file system of the current process to the directory put_old and makes new_root the new root file system. Since
pivot_root(8) simply calls pivot_root(2), we refer to the man page of the latter for further details.
Note that, depending on the implementation of pivot_root, root and cwd of the caller may or may not change. The following is a sequence for
invoking pivot_root that works in either case, assuming that pivot_root and chroot are in the current PATH:
cd new_root
pivot_root . put_old
exec chroot . command
Note that chroot must be available under the old root and under the new root, because pivot_root may or may not have implicitly changed the
root directory of the shell.
Note that exec chroot changes the running executable, which is necessary if the old root directory should be unmounted afterwards. Also
note that standard input, output, and error may still point to a device on the old root file system, keeping it busy. They can easily be
changed when invoking chroot (see below; note the absence of leading slashes to make it work whether pivot_root has changed the shell's
root or not).
EXAMPLES
Change the root file system to /dev/hda1 from an interactive shell:
mount /dev/hda1 /new-root
cd /new-root
pivot_root . old-root
exec chroot . sh <dev/console >dev/console 2>&1
umount /old-root
Mount the new root file system over NFS from 10.0.0.1:/my_root and run init:
ifconfig lo 127.0.0.1 up # for portmap
# configure Ethernet or such
portmap # for lockd (implicitly started by mount)
mount -o ro 10.0.0.1:/my_root /mnt
killall portmap # portmap keeps old root busy
cd /mnt
pivot_root . old_root
exec chroot . sh -c 'umount /old_root; exec /sbin/init'
<dev/console >dev/console 2>&1
SEE ALSO
chroot(1), mount(8), pivot_root(2), umount(8)
AVAILABILITY
The pivot_root command is part of the util-linux-ng package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
Linux Feb 23, 2000 PIVOT_ROOT(8)