Please also show us the output you get from the command:
The diagnostic message you're getting could be caused by some unexpected character sequence between the -exec and the end of that line in your script. Although I don't get that diagnostic with the BSD-based find on macOS version 10.13.3, one might expect something like that if there is a null byte anywhere after the -exec or if there is a <carriage-return> just after the \;.
I have a directory which contains files with different kinds of extensions .everyday a file with .log gets added to it .i want to extract the file with .log extension which is created with todays date .
thanks in advance (2 Replies)
I have a directory MYDIR
In which i have several directories 1,2,3,4....
Now, In each of these directories i have several files a.dat, b.dat, c.dat, d.dat.....
MYDIR
----1
---------a.dat
---------b.dat
---------c.dat
---------d.dat
----2
---------a.dat
---------b.dat
---------c.dat... (2 Replies)
Hi, I have a directory PRIVATE in which I have several directories and each of these have several files. Therefore, I need to find those files by size and date to back up those files in another directory.
I don't know how to implement this shell script using ''find''.
appreciate any... (1 Reply)
hi guys,
Suppose you have 100 files in a folder and you want to replace all occurances of a word say "ABCD" in those files with "DCBA", how would you do
it ???
jatin (13 Replies)
Hi Experts,
I am trying to write a shell script that should
1. Find files with name (ab030.txt,Ab030.TXT,AB030.TXT,ab030.TXT,AB030.txt)
2. If any of the above found, rename it to AB030.TXT
Thanks. (4 Replies)
Hi. I have a problem that i can't seem to resolve. I need to create a script that list all the files, that are found recursively, with the same name.
For example if a file exists in more than one directory with the same name it list all the files that he founds with all the info. Could someone... (5 Replies)
Hello all,
I am in need of assistance in creating a script that will remove a specified block of text from multiple .htaccess files. (roughly 1000 files)
I am attempting to help with a project to clean up a linux server that has a series of unwanted url rewrites in place, as well as some... (4 Replies)
Hi friends.. I have many dirs in my working directory. Every dir have thousands of files (.jsp, .java, .xml..., etc). So I am working with an script to find every file recursively within those directories and subdirectories ending with .jsp or .java which contains inside of it, the the pattern... (3 Replies)
Hi,
I have the shell script requirement mentioned below :
List all java and c files or all files in directory and sub directories' in folder structure in current dir.
then search for pattren1 in all files globally and replace with other string .
And also check the date... (3 Replies)
Hi all,
i am new to this forum, unix and shell scripting.
I would really appreciate if you all can help me here..
I have files coming in the below format
'filename20513'13May06:03:45
filename are characters..
like 'ABDDUT20513'13May06:03:45
i need it to be renamed as... (17 Replies)
Discussion started by: khman
17 Replies
LEARN ABOUT FREEBSD
pathchk
PATHCHK(1) BSD General Commands Manual PATHCHK(1)NAME
pathchk -- check pathnames
SYNOPSIS
pathchk [-pP] pathname ...
DESCRIPTION
The pathchk utility checks whether each of the specified pathname arguments is valid or portable.
A diagnostic message is written for each argument that:
o Is longer than PATH_MAX bytes.
o Contains any component longer than NAME_MAX bytes. (The value of NAME_MAX depends on the underlying file system.)
o Contains a directory component that is not searchable.
It is not considered an error if a pathname argument contains a nonexistent component as long as a component by that name could be created.
The options are as follows:
-p Perform portability checks on the specified pathname arguments. Diagnostic messages will be written for each argument that:
o Is longer than _POSIX_PATH_MAX (255) bytes.
o Contains a component longer than _POSIX_NAME_MAX (14) bytes.
o Contains any character not in the portable filename character set (that is, alphanumeric characters, '.', '-' and '_'). No com-
ponent may start with the hyphen ('-') character.
-P In addition to the default or -p checks, write a diagnostic for each argument that:
o Is empty.
o Contains a component that starts with a hyphen.
EXIT STATUS
The pathchk utility exits 0 on success, and >0 if an error occurs.
EXAMPLES
Check whether the names of files in the current directory are portable to other POSIX systems:
find . -exec pathchk -p -- {} +
SEE ALSO getconf(1), pathconf(2), stat(2)STANDARDS
The pathchk utility conforms to IEEE Std 1003.1-2001 (``POSIX.1'').
HISTORY
A pathchk utility appeared in FreeBSD 5.0.
BSD May 1, 2010 BSD