Sponsored Content
Top Forums UNIX for Beginners Questions & Answers How to find and get a file in an entire directory with an excluded directory specified? Post 303014866 by shajay12 on Thursday 22nd of March 2018 06:14:36 AM
Old 03-22-2018
If -prune doesn't work for you, this will:
Moderator's Comments:
Mod Comment Please use code html tags


Code:
find -name "*.js" -not -path "./directory/*"

---------- Post updated at 05:13 AM ---------- Previous update was at 05:12 AM ----------

Code:
find . -name '*.js' -and -not -path directory

---------- Post updated at 05:14 AM ---------- Previous update was at 05:13 AM ----------

This is the format I used to exclude some paths:

Code:
$ find ./ -type f -name "pattern" ! -path "excluded path" ! -path "excluded path"

I used this to find all files not in ".*" paths:

Code:
$ find ./ -type f -name "*" ! -path "./.*" ! -path "./*/.*"


Last edited by jim mcnamara; 03-22-2018 at 09:24 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to find a file named vijay in a directory using find command

I need to find whether there is a file named vijay is there or not in folder named "opt" .I tried "ls *|grep vijay" but it showed permission problem. so i need to use find command (6 Replies)
Discussion started by: amirthraj_12
6 Replies

2. UNIX for Dummies Questions & Answers

Script to find a string in a directory/sub-directory

I'm trying to find this string 'preparing string IBE_Quote_W1_Pvt.SaveWrapper for quote_header_id’ in my Apache log file directory. The log file that contains this string may be in a parent direcotry or a sub-directory. I have tried 'grep' and 'awk' with no success. I would like to get the path... (3 Replies)
Discussion started by: gross
3 Replies

3. UNIX for Dummies Questions & Answers

how to zip the entire directory

my first question is how to zip the entire directory contents. second question is can we unzip the same file through windows environment. please help i need to complete it by EOD (3 Replies)
Discussion started by: bbc17484
3 Replies

4. Shell Programming and Scripting

tar the entire directory except one directory

Hi All, I need to tar the entire directory except one directory inside that. I have used the below command tar -cvfX test.tar bin/perl bin/ I need to tar all the directories inside the bindirectory except the perl directory Please help me in solving this :b: Regards, Kalai (4 Replies)
Discussion started by: kalpeer
4 Replies

5. Shell Programming and Scripting

Find file in a directory

Hi, I'm trying to write a script that search file in folder. I got problems with selecting specific file from the list of the files. when I runing the script I get a list of files instead of one specific file. I'm new with linux :) #!/bin/bash FILE=false ISFOUND=false while getopts... (6 Replies)
Discussion started by: SimonBASH
6 Replies

6. UNIX for Dummies Questions & Answers

cannot find file directory

hi, i use command at below to copy the file and put it in the new file (if no such file, it will create right ) cat id_rsa.pub >>~/.ssh/authorized_keys it give me error bash: /home/pc2/.ssh/authorized_keys : No such file or directory can anyone tell me why this happened ? thanks in... (1 Reply)
Discussion started by: Ericyue
1 Replies

7. AIX

Using restorevgfiles to restore entire directory from rootvg problems

I am trying to restore a specific directory and all sub-directories therein using a rootvg tape. I am using the following command to make the backup: mksysb -m -i -v /dev/rmt0 However, I am getting the following result: tctl status rmt0 Available 04-08-00-0,0 LVD SCSI 4mm Tape Drive... (10 Replies)
Discussion started by: herot
10 Replies

8. Shell Programming and Scripting

Looping through entire directory and count unique values

Hello, I`m a complete newbie to coding, please help with this problem. I have multiple files in a directory, I have to loop through the contents of each file and extract number of unique isoforms in that file. Each file is tab delimited and only the line with the first parent (column 3)... (1 Reply)
Discussion started by: ritakadm
1 Replies

9. Shell Programming and Scripting

Find every directory named XYZ under the DVLP directory

I only want to find files under each branch of the directory tree inside directories named XYZ and there are multiple XYZ directories? (7 Replies)
Discussion started by: emc^24sho
7 Replies

10. UNIX for Dummies Questions & Answers

Append two lines of text to php.ini in the entire directory tree.e

I am looking to write a script that will read the php.ini files on my web host. If the two lines do exist do nothing. If not append two lines to the end of it then move on to the next directory and open the next php.ini file. I have the beginning of one that was given to me on another web site but... (6 Replies)
Discussion started by: Larrykh465
6 Replies
build-lives-rfx-plugin-multi(1) 			      General Commands Manual				   build-lives-rfx-plugin-multi(1)

NAME
build-lives-rfx-plugin-multi - builds rendered effects for LiVES SYNOPSIS
build-lives-rfx-plugin-multi type [scripts_dir exec_dir] [build_bindir] DESCRIPTION
This perl script builds rendered effects (RFX) plugins for LiVES. If scripts_dir is not defined then type is used to locate the plugin scripts directory and output directory. Type can be builtin (the default), custom, test, or builtinx. The type builtinx forces scripts_dir and exec_dir to be read from parameters and is used during LiVES install, and is the only type which should be used if scripts_dir is specified. Each plugin script in input directory is scanned to find its language code. The script is then passed to the script compiler for that lan- guage. The directory location of the script_compiler may be specified by the build_bindir parameter (as is the case during LiVES installa- tion0; otherwise the user's $PATH will be searched. Return values the script returns the following values 0 - success 1 - the "type" parameter was not defined, or set to an invalid value 3 - the builder for a plugin script was not found SEE ALSO
build-lives-rfx-plugin(1), lives(1) AUTHOR
Gabriel Finch a.k.a Salsaman (salsaman@xs4all.nl) May 9 2010 build-lives-rfx-plugin-multi(1)
All times are GMT -4. The time now is 12:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy