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
STICKY(7)					       BSD Miscellaneous Information Manual						 STICKY(7)

NAME
sticky -- sticky text and append-only directories DESCRIPTION
A special file mode, called the sticky bit (mode S_ISTXT), is used to indicate special treatment for directories. It is ignored for regular files. See chmod(2) or the file <sys/stat.h> for an explanation of file modes. STICKY DIRECTORIES
A directory whose `sticky bit' is set becomes an append-only directory, or, more accurately, a directory in which the deletion of files is restricted. A file in a sticky directory may only be removed or renamed by a user if the user has write permission for the directory and the user is the owner of the file, the owner of the directory, or the super-user. This feature is usefully applied to directories such as /tmp which must be publicly writable but should deny users the license to arbitrarily delete or rename each others' files. Any user may create a sticky directory. See chmod(1) for details about modifying file modes. HISTORY
A sticky command appeared in Version 32V AT&T UNIX. BUGS
Neither open(2) nor mkdir(2) will create a file with the sticky bit set. BSD
June 5, 1993 BSD
All times are GMT -4. The time now is 10:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy