9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all. I'm hitting a problem creating a tar archive in one directory from files located in a different directory. It fails when I replace the absolute paths with variables in the script but works if I just run tar on the cmdln. E.g.
#!/bin/ksh
BASE=$PWD
STAGE=$BASE/stage
LOG=$BASE/log... (4 Replies)
Discussion started by: user052009
4 Replies
2. Shell Programming and Scripting
Can you please help tweak the below command to exclude all directories with the name "logs" and "tmp"
find . -type f \( ! -name "*.tar*" ! -name "*.bkp*" \) -exec /usr/xpg4/bin/grep -i "user_1" /dev/null {} + >result.out
bash-3.2$ uname -a
SunOS mymac 5.10 Generic_150400-26 sun4v sparc sun4v... (9 Replies)
Discussion started by: mohtashims
9 Replies
3. Shell Programming and Scripting
#cat a
BAC064DAL
BAC063DAL
BAC056PHX
BAC066DAL
BAC062PHX
BAC062DAL
BAC060DAL
BAC058PHX
BAC054PHX
BAC051PHX
# for i in `cat a`
> do
> tar xvf $a/$a*.tar*
> done
tar: /*.tar*: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
tar: /*.tar*: Cannot... (3 Replies)
Discussion started by: kenshinhimura
3 Replies
4. AIX
Hi, im having some issues after i execute the next command:
tar -cvf /varios/restore/test.tar -X /jfma/test1/excludefile /jfma | gzip -c > /varios/restore/test.tar.gz
this creates the desired "test.tar.gz" file, but whe i try to open it it says "tar: 0511-164 There is a media read or write... (6 Replies)
Discussion started by: blacksteel1988
6 Replies
5. UNIX for Advanced & Expert Users
Hi
Somebody must have done this before, but I can't seem to find any answer on my problem.
On HP-UX 11i v3 I have a relatively large tar ball (~120 GB), and I want to create the directory structure only from the archive.
There is no option to make a new archive with only the directory... (3 Replies)
Discussion started by: hpvm_adm
3 Replies
6. Shell Programming and Scripting
i have issue with tar, let me explain
when i run below command it works perfectly as usual.
tar -cvf /tmp/temp.tar --exclude="exclusion expression" dir
my requirement is --exclude="exclusion expression" will come from another variable.
so when i execute below command:
tar -cvf... (2 Replies)
Discussion started by: ajayyadavmca
2 Replies
7. Shell Programming and Scripting
Hi Forum.
I'm trying to write a script that finds and deletes files that are older than 300 days. The script will read a table that contains the following 3 columns:
1st col: “Y” means sub-directory scan; "N" means no subdirectory scan
2nd col: sub-directory location
3rd col: File prefix... (7 Replies)
Discussion started by: pchang
7 Replies
8. UNIX for Dummies Questions & Answers
Hi,
Can some one help me how to exclude multiple directories using find command..
I have the directory structure below.
/a/a1/b1
/a/c1/c2
/a/d1/d2/d3
I want to exlcude a1,c2and d3 from the above using find,can some one suggest pls..
thanks in advance...
Use code tags... (1 Reply)
Discussion started by: jagadish_gaddam
1 Replies
9. UNIX for Dummies Questions & Answers
Howdy
I have this directory structure ...
eep
eepaptest
eepfatest
eepgltest
eep.old
eeppoptest
ehf
ehfaptest
ehfgltest
ehp
ehpgltest
I want to find files in these directories, but I want to exclude eep, ehf & ehp.
Cany anyone help with the correct command ?? (1 Reply)
Discussion started by: SmurfGGM
1 Replies