Sponsored Content
Top Forums Shell Programming and Scripting Global Pattern - exclude directories Post 302843238 by vino_hymi on Monday 12th of August 2013 12:21:05 PM
Old 08-12-2013
Yes, i did.

---------- Post updated at 09:51 PM ---------- Previous update was at 09:40 PM ----------

And one more information, the script works perfectly in my Mac bash terminal but fails in solaris sun bash terminal.
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

GNUTAR exclude directories

Hi, Can anyone help me with the following: I want to make a backup from my (AIX) system. But I don't want to backup a couple of temp-directories. I tried it with the X-option, but that didn't work. I hope that someone can help me. Thanks in advance. Corine (6 Replies)
Discussion started by: TheBlueLady
6 Replies

2. UNIX for Dummies Questions & Answers

find command to exclude directories

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

3. Shell Programming and Scripting

Find but exclude directories

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

4. Shell Programming and Scripting

Help - Find command to exclude sub-directories

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

How to exclude the empty directories

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

Perl exclude directories in command line

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. Programming

Using sql like to choose a pattern and exclude a pattern

Hi, I am writing an sql query in which i have to choose only that url that are from particular host but are not zip files. something like: select * from mytable where url like '%myhost%' and url not like '%zip%' Is there a simple way to combine these two condition into one? (3 Replies)
Discussion started by: vickylife
3 Replies

8. AIX

Exclude Directories in my tar command

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

Exclude directories in FIND command

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
refile(1mh)															       refile(1mh)

Name
       refile - file message in other folders

Syntax
       refile [ msgs ] [ +folder ] [ options ]

Description
       Use  the  command to move the specified message from the current folder to another folder.  You can refile messages in more than one folder
       by giving multiple folder names as arguments.

       If you do not specify a message, the current message is refiled.  You can refile a message other than the current  message  by  giving  its
       number  as  a msgs argument.  You can also refile more than one message at a time by specifying more than one message number, or a range of
       message numbers, or a message sequence.	See for more information on sequences.

       The current folder remains the same unless the -src option is specified; in that case, the source folder becomes  current.   Normally,  the
       last message specified becomes the current message.  However, if the -link option is used, the current message is not changed.

       If  the	Previous-Sequence:  entry is set in the file, in addition to defining the named sequences from the source folder, will also define
       those sequences for the destination folders.  See for information concerning the previous sequence.

Options
       -draft	 Refiles the draft message, or the current message in your folder, if you have one set up.  You cannot give a msgs  argument  when
		 you use this option.

       -file filename
		 Moves	a  file into a folder.	This option takes a file from its directory and places it in the named folder, as the next message
		 in the folder.  The file must be formatted as a legal mail message.  This means that the message must	have  the  minimum  header
		 fields separated from the body of the message by a blank line or a line of dashes.

       -help	 Prints a list of the valid options to this command.

       -link
       -nolink	 Keeps	a copy of the message in the source folder.  Normally, removes the messages from the original folder when it refiles them.
		 The -link option keeps a copy in the original folder, as well as filing a copy in the new folder.

       -preserve
       -nopreserve
		 Preserves the number of a message in the new folder.  Normally, when a message is refiled in to another folder, it is set to  the
		 next  available number in that folder.  The -preserve option keeps the number of the message the same in the new folder as it had
		 been in the old.

		 You cannot have two messages with the same number in one folder, so you should use this option with care.

       -src +folder
		 Specifies the source folder to take messages from.  Normally, messages are refiled from the current folder into  another  folder.
		 However, you can take messages from a different folder by using the -src +folder option to specify the alternative source folder.

Examples
       The following example refiles messages 3 and 5 in the folder
       % refile 3 5 +records

       The next example files the current message into two folders:
       % refile +jones +map

       The next example takes message 13 in the current folder and refiles it in the folder.  The message remains in the current folder as well as
       appearing in the folder.
       % refile -link 13 +test

       The next example takes a message from the folder when it is not the current folder, and places it in the folder
       % refile 3 -src +test +outbox

Profile Components
       Path:		 To determine your Mail directory

       Folder-Protect:	 To set protections when creating a new folder
       rmmproc: 	 Program to delete the message

Files
       The user profile.

See Also
       folder(1mh), mark(1mh), mh_profile(5mh)

																       refile(1mh)
All times are GMT -4. The time now is 10:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy