Thanks Roaima will make sure i put all the information going forward. Add a comment. I also tried -prune option but no help And what happened? Sign up or log in Sign up using Google. Sign up using Facebook.
Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually.
Linked Related Hot Network Questions. Question feed. Even though i use a wil character search the find command is checking the hidden files which inturn results in error.
Can i avoid look that into the hidden files?? I am using HP unix. PLease let me know if is urgent Thanks, Arun. Code :. Join Date: Jan He means files prepended with a period,. You can use a regex to exclude these files and directories: find. I even though tried the regex you suggested it was not working. Why it is happening. And how to exclude the hidden files and directory in the above command. Please help. Thanks Arun. Shell Programming and Scripting. Rsync - how to copy hidden folder or hidden files when using full path.
And no full source directories are in use, only some files. Source example Find command excluding directories and some files. I try to print a list of files but excluding some directories and some files.
Hi All, requirement is to find and remove the files from sub directories but it should exclude the files from parent directory. At present i am using the below one but it finds and remove files from both parent and sub directories. Find all files in the current directory excluding hidden files and directories.
As you can see above, it outputs the full paths of the files which are returned by the search. Here, the '. Find will search for the filename pattern in the current directory, all subdirectories, and so on till the deepest level of the file structure. Similarly, you can have any other directory in place of '. Now, there can be scenarios when a user is sure that a certain folder or folders do not contain the file to be searched for.
Hence, it is a good idea to exclude such folders from the search, so that the command returns the results faster. The part "-name '.
We simply pass the pattern described in the earlier example here. However, the folder name itself is getting printed. To avoid this, simply append '-print' at the end.
0コメント