12-19-2008
Trying to untar then chown, and chmod
I'm changing (trying to anyway) a script that will need to unrar a file, this file will create a directory with files in it. Then I need to change the owner ship and permission on that directory. Finally, I will rsync the directory to another machine.
This is what I have so far.
#!/bin/bash
###Grab the name of the .trz file and unzip
echo -e "Enter the name of the patch file: \c"
read file
tar -zxf $file
##### This is where I'm stuck, not sure what the next step is.
####Below was the original script that would rsynce the directory if the permissions were already set and the file was already untarred####
echo -e "Please enter the directory of patch (exclude trailing slash) : \c"
read patch
rsync -rpvgo --force $patch
user@somemachine.com:/srv/patches
rsync -rpvgo --force $patch
user@somemachine.com:/srv/patches
10 More Discussions You Might Find Interesting
1. AIX
hello
chown not change ownership
before:
205:system ~kuku
chown kuku:system ~kuku
after no change
205:system ~kuku
aix box
can someone help me?
ariec (2 Replies)
Discussion started by: ariec
2 Replies
2. UNIX for Advanced & Expert Users
I have a strange problem in my Linux box (Suse). Recently I took over this box as admin even though I have no prior admin experience. Following is my issue
I had following users under 'root' group initially
user1
user2
user3
Since I did not like user ids under root group. I modifed these... (9 Replies)
Discussion started by: praveenkumar_l
9 Replies
3. UNIX for Dummies Questions & Answers
is there a difference in chown on a file or a directory?
how do i chown a directory and all the contents? (2 Replies)
Discussion started by: BG_JrAdmin
2 Replies
4. Shell Programming and Scripting
hello
i want shell script.
i have a source.txt
/home/user409/public_html/test/
/home/user09876/public_html/xdsss/
/home/user9765/public_html/320xxx/
.
.
.
maybe 1000 lines
i want .
1.read a source.txt
2.untar special.tar.gz into these directory in source.txt
3.i want to... (14 Replies)
Discussion started by: topic32428285
14 Replies
5. Shell Programming and Scripting
I have a file fin2009_4.txt.gz in the unix ftp server. Owner of the file is: ftpusr.
-rw-r--r-- 1 ftpusr sap 0 Feb 19 10:19 fin2009_4.txt.gz
When I try to delete this file after copying to my home folder, I am getting the following error.
rm: fin2009_4.txt.gz1: override... (4 Replies)
Discussion started by: sid1982
4 Replies
6. UNIX and Linux Applications
i think it is the same in both... Iam i right? (1 Reply)
Discussion started by: sumaiya
1 Replies
7. Solaris
Hello
My oracledatabase creats some xmlfiles. this files has the owner hugo. now I've a script (how runs als hugo2) and this script will insert this XMLFile into the database. But that doesn't work, because the owner of the files is wrong, and hugo has not the rights to insert this files into... (3 Replies)
Discussion started by: Street
3 Replies
8. Shell Programming and Scripting
does anyone know how to exclude a directory with chown or chmod?
im trying to do something like this
chown $username:$username $directory/*
chown $username:$username $directory/.*
chown $username:$username $directory
and
find $directory/* -type f -exec... (1 Reply)
Discussion started by: vanessafan99
1 Replies
9. Shell Programming and Scripting
My git user has permission in sudoers to run a wrapper script to move files into my webroot.
Everything is working fine except for the chown line. After the script has run, the files ar still root:root instead of apache:apache.
Scratching my head...:confused:
#!/bin/sh
echo
echo "****... (4 Replies)
Discussion started by: dheian
4 Replies
10. UNIX for Dummies Questions & Answers
Hi All,
Seeking for your assistance on how to log that has been chmod,mv,chown,chgrp and how to prevent script running while chmod,mv,chown,chgrp are still running?
Ex: a/b/c-folder
file1.txt
file2.txt
file3.txt
chmod 777 *
chown owner
owner group
mv
what i did was(please see... (6 Replies)
Discussion started by: nikki1200
6 Replies
LEARN ABOUT MOJAVE
git-quiltimport
GIT-QUILTIMPORT(1) Git Manual GIT-QUILTIMPORT(1)
NAME
git-quiltimport - Applies a quilt patchset onto the current branch
SYNOPSIS
git quiltimport [--dry-run | -n] [--author <author>] [--patches <dir>]
[--series <file>]
DESCRIPTION
Applies a quilt patchset onto the current Git branch, preserving the patch boundaries, patch order, and patch descriptions present in the
quilt patchset.
For each patch the code attempts to extract the author from the patch description. If that fails it falls back to the author specified with
--author. If the --author flag was not given the patch description is displayed and the user is asked to interactively enter the author of
the patch.
If a subject is not found in the patch description the patch name is preserved as the 1 line subject in the Git description.
OPTIONS
-n, --dry-run
Walk through the patches in the series and warn if we cannot find all of the necessary information to commit a patch. At the time of
this writing only missing author information is warned about.
--author Author Name <Author Email>
The author name and email address to use when no author information can be found in the patch description.
--patches <dir>
The directory to find the quilt patches.
The default for the patch directory is patches or the value of the $QUILT_PATCHES environment variable.
--series <file>
The quilt series file.
The default for the series file is <patches>/series or the value of the $QUILT_SERIES environment variable.
GIT
Part of the git(1) suite
Git 2.17.1 10/05/2018 GIT-QUILTIMPORT(1)