How to find files that have a specific content in linux
How to find files that have a specific content
# find /usr | grep limits.h | xargs -I {} grep -H 'NAME_MAX' {}
Sample output:
/usr/include/linux/limits.h:#define NAME_MAX 255 /* # chars in a file name */
/usr/include/linux/limits.h:#define XATTR_NAME_MAX 255 /* # chars in an extended attribute name */
/usr/src/linux-headers-4.15.0-54/include/uapi/linux/limits.h:#define NAME_MAX 255 /* # chars in a file name */
/usr/src/linux-headers-4.15.0-54/include/uapi/linux/limits.h:#define XATTR_NAME_MAX 255 /* # chars in an extended attribute name */
/usr/src/linux-headers-4.15.0-151/include/uapi/linux/limits.h:#define NAME_MAX 255 /* # chars in a file name */
/usr/src/linux-headers-4.15.0-151/include/uapi/linux/limits.h:#define XATTR_NAME_MAX 255 /* # chars in an extended attribute name */
Comments
Post a Comment