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
backup(1M)																backup(1M)

NAME
backup - backup or archive file system SYNOPSIS
[-archive] DESCRIPTION
The command uses find(1) and cpio(1) to save a archive of all files that have been modified since the modification time of on the default tape drive should be invoked periodically to ensure adequate file backup. The option suppresses warning messages regarding optional access control list entries. backup(1M) does not backup optional access control list entries in a file's access control list (see acl(5)). Normally, a warning message is printed for each file having optional access control list entries. The option causes backup to save all files, regardless of their modification date, and then update using touch(1). prompts you to mount a new tape and continue if there is no more room on the current tape. Note that this prompting does not occur if you are running from cron(1M). The option causes to start a file system consistency check (without correction) after the backup is complete. For correct results, it is important that the system be effectively single-user while is running, especially if is allowed to automatically fix whatever inconsisten- cies it finds. does not ensure that the system is single-user. You can edit to customize it for your system. Several local values are used that can be customized: specifies which directories to back up recursively (usually meaning all directories); file name where start and finish times, block counts, and error messages are logged; file name whose date is the date of the last archive; file name that is checked by to remind the next person who logs in to change the backup tape; file name where start and finish times and output is logged. You may want to make other changes, such as whether or not does automatic correction (according to its arguments), where output is directed, other information logging, etc. In all cases, the output from is a normal archive file (or volume) which can be read using with the option. File Recovery creates archive tapes with all files and directories specified relative to the root directory. When recovering files from an archive tape created by you should be in the root directory and specify the directory path names for recovered files relative to the root directory When specifying the directory path name for file recovery by do not precede the leading directory name with a slash. If you prefer, you can also use with a option to determine how files and directories are named on the archive tape before attempting recovery. WARNINGS
Refer to in cpio(1). When runs out of tape, it sends an error to standard error and demands a new special file name from To continue, rewind the tape, mount the new tape, type the name of the new special file at the system console, and press If is being run unattended from cron(1M) and the tape runs out, terminates, leaving the process still waiting. Kill this process when you return. FILES
parameterized file names SEE ALSO
cpio(1), find(1), touch(1), cron(1M), fbackup(1M), frecover(1M), fsck(1M), acl(5). backup(1M)
All times are GMT -4. The time now is 11:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy