Sponsored Content
Full Discussion: Warning using 'find'.
Operating Systems OS X (Apple) Warning using 'find'. Post 302994611 by bakunin on Saturday 25th of March 2017 06:15:10 AM
Old 03-25-2017
It is a - quite common - misconception to think that files/directories which names start with a dot are somehow special. They are not. In fact the only "special treatment" they receive is by the ls-command which does not display them as long as the option -a (display them anyway) is not given.

For all other commands (including find) directories and/or filenames starting with a dot a just as normal as all the others. If you want to exclude them from your result set you have to take specific precautions to filter them out. For the same reason:

Code:
rm ..

might not do what you wanted/expected it to do, but syntactically the command is OK and - given the right privileges - will do what it is supposed to do (which, again, might not be what you wanted, but that is another problem).

I hope this helps.

bakunin
 

2 More Discussions You Might Find Interesting

1. Solaris

Jumpstart -- Warning: Could not find matching rule in rules.ok

I just setup a new jumpstart server, and I'm having problems with rules.ok errors. I'm coming up blank after many Google searches, forum searches, etc..... This is the error I receive: Skipped interface e1000g1 Attempting to configure interface e1000g0... Configured interface e1000g0... (0 Replies)
Discussion started by: christr
0 Replies

2. Shell Programming and Scripting

find command giving incomplete sentence warning

Hi , I am adding a line in my shell scripts to delete all the old directory with the below command. On running this command it is coming out with the message find: incomplete statement find /ersdg3/ERS/ERS_INPUT_LOGS/RIO/rio_archive -type d -mtime +47 -exec rm -rf {} What is wrong or... (3 Replies)
Discussion started by: guddu_12
3 Replies
DH_CLEAN(1)                                                          Debhelper                                                         DH_CLEAN(1)

NAME
dh_clean - clean up package build directories SYNOPSIS
dh_clean [debhelperoptions] [-k] [-d] [-Xitem] [path...] DESCRIPTION
dh_clean is a debhelper program that is responsible for cleaning up after a package is built. It removes the package build directories, and removes some other files including debian/files, and any detritus left behind by other debhelper commands. It also removes common files that should not appear in a Debian diff: #*# *~ DEADJOE *.orig *.rej *.SUMS TAGS .deps/* *.P *-stamp It does not run "make clean" to clean up after the build process. Use dh_auto_clean(1) to do things like that. dh_clean should be the last debhelper command run in the clean target in debian/rules. FILES
debian/clean Can list other paths to be removed. Note that directories listed in this file must end with a trailing slash. Any content in these directories will be removed as well. OPTIONS
-k, --keep This is deprecated, use dh_prep(1) instead. The option is removed in compat 12. -d, --dirs-only Only clean the package build directories, do not clean up any other files at all. -Xitem --exclude=item Exclude files that contain item anywhere in their filename from being deleted, even if they would normally be deleted. You may use this option multiple times to build up a list of things to exclude. path ... Delete these paths too. Note that directories passed as arguments must end with a trailing slash. Any content in these directories will be removed as well. SEE ALSO
debhelper(7) This program is a part of debhelper. AUTHOR
Joey Hess <joeyh@debian.org> 11.1.6ubuntu2 2018-05-10 DH_CLEAN(1)
All times are GMT -4. The time now is 11:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy