04-17-2003
Well the situation is as follows.
I've got a couple of directories containing files.
/appl/data
/appl/data/temp1
/appl/data/temp2
Now I would like to backup the directory /appl/data, but NOT the 2 temp directories.
So my command was as follows:
find /appl/data -name 'temp*' -prune -o -print | xargs tar -cvf /tmp/datadir.tar
This works but not completely because in the tar-file it is:
first everything (so also the temp-dir) and appended to the file is exactly what I want (so /appl/data and not the temp-dir). I am wondering what am I doing wrong ?
I hope someone can help me.
9 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
Hello,
I have a line in my script to find the files changed in the last 24 hours. It is as below:
find /home/hary -type f -mtime -1
I now want to exclude a directory named "/home/hary/temp/cache" from the above find command. How do I add it to my script?
Any help is appreciated.
... (9 Replies)
Discussion started by: tadi18
9 Replies
3. 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
4. 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
5. Shell Programming and Scripting
Hi.,
I have a script, in which I am processing a files present in the directory types.
ls -lrt | grep ^d | grep Dir_type | awk -f '{print $9}' |\
while read dir_name; do
#operations
done
where Dir_type is the pattern in which directories get created. How to filter out empty... (2 Replies)
Discussion started by: IND123
2 Replies
6. Shell Programming and Scripting
Hi,
I use find command to list all the files in a directory and its sub-directories, but the problem is to exclude certain directories during search. Can i give the directory names in command line to skip them and search rest of the directories?
For example i have directories:
test
../test1... (1 Reply)
Discussion started by: nmattam
1 Replies
7. Shell Programming and Scripting
All,
I am trying delete folder by adding pattern not to delete certain folders. But i struck with error.
When i use below command from command line, it works fine.
shopt -s extglob
rm -rf !(test1|test2|test3)
But when i use the same in shell script, i get the below error.
syntax... (6 Replies)
Discussion started by: vino_hymi
6 Replies
8. 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
9. 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
LEARN ABOUT DEBIAN
eliomc
ELIOMC(1) General Commands Manual ELIOMC(1)
NAME
eliomc, eliomcp, eliomopt, js_of_eliom, eliomdep - the eliom build tools
SYNOPSIS
eliomc [options] files
eliomcp [options] files
eliomopt [options] files
eliomdep [options] files
js_of_eliom [options] files -o filename.js
DESCRIPTION
eliomc, eliomcp and eliomopt are wrapper around the OCaml compiler that ease the compilation of the server part of projects based on the
Eliom framework. They respectively accept the same set of option than the ocamlc(1),ocamlcp(1) and ocamlopt(1) compilers plus the specific
ones described in the OPTIONS section.
js_of_eliom is a wrapper around the OCaml and Js_of_ocaml compilers that ease the compilation of the client part of projects based on the
Eliom framework. It accepts the same set of option than the ocamlc(1) compiler plus the specific ones described in the OPTIONS section.
eliomdep is a wrapper around ocamldep(1) that handles dependencies of an .eliom source files. It accepts the same set of options plus the
specific ones described in the OPTIONS section. Warnings: this tools is still limited and do not handle dependencies towards an .eliom
files.
COMPILING ELIOM SOURCE FILES
The compilation of files with a .eliom extension is achieved in three steps: infer the type of value sent by the server to the client; com-
pile the server part of the code and compile the client part. The first two steps can be realised with eliomc and the last one with
js_of_eliom.
Both tools produce a .cmo file named as the original .eliom file. To avoid overwriting the .cmo representing the server part with .cmo of
the client part, files generated by eliomc or eliomopt are stored by default in a subdirectory named _server and files generated by
js_of_eliom are stored in a subdirectory named _client. Those default directories could be respectively overridden by the environment vari-
ables ELIOM_SERVER_DIR and ELIOM_CLIENT_DIR.
The types infered by eliomc for values sent by the server to the client are stored in an intermediate files named as the original .eliom
file and whose extension is .type_mli. That file is required by js_of_eliom for compiling the client part of the .eliom file. The eliomdep
tool correctly generate dependencies that intermediate file for the server .cmo and the client .cmo.
OPTIONS
-dir <dir>
Specify the target directory for generated files
-package <name>
This is the same option as the ocamlfind one.
-predicates <p>
This is the same option as the ocamlfind one.
-ppopt <opt>
Append <opt> to preprocessor invocation.
-jsopt <opt>
Append <opt> to js_of_ocaml invocation (js_of_eliom only).
-infer <opt>
For .eliom file, only generate the intermediate .type_mli file (eliomc and eliomopt only).
-noinfer <opt>
For .eliom file, do not generate the intermediate .type_mli file (eliomc and eliomopt only).
-help or --help
Display a short usage summary and exit.
EXAMPLES
The compilation of an Eliom projects composed of a server specific file named server.ml, a client specific file named client.ml and two
common files name base.eliom and main.eliom, could be achieved with the following commands:
eliomc -a -o appl.cma server.ml base.eliom main.eliom
js_of_eliom -o appl.js client.ml base.eliom main.eliom
To avoid recompiling the whole project each times, this could be split in multiple steps:
eliomc -c server.ml
eliomc -c base.eliom
eliomc -c main.eliom
eliomc -a -o appl.cma _server/server.cmo _server/base.cmo _server/main.cmo
js_of_eliom -c client.ml
js_of_eliom -c base.eliom
js_of_eliom -c main.eliom
js_of_eliom -o appl.js _client/client.cmo _client/base.cmo _client/main.cmo
SEE ALSO
ocamlc(1), ocamlopt(1), js_of_ocaml(1), ocamlfind(1), ocamlcp(1), ocamldep(1).
AUTHOR
eliomc, js_of_eliom, eliomdep and eliomopt were written by Gregoire Henry <gregoire.henry@pps.jussieu.fr>.
This manual page was written by Pierre Chambart <chambart@crans.org>.
2012-02-15 ELIOMC(1)