Skip to main content
deleted 138 characters in body
Source Link
Kusalananda
  • 356.2k
  • 42
  • 737
  • 1.1k
find . -type f -exec grep -I -q . {} \; -print 

This will find all regular files (-type f) in the current directory (or below) that grep thinks are non-empty and non-binary.

It uses grep -I to distinguish between binary and non-binary files. The -I flag and will cause grep to exit with a non-zero exit status when it detects that a file is binary. A "binary" file is, according to grep, a file that contains character outside the printable ASCII range1.

The -q option to grep will cause it to quitequit with a zero exit status if the given pattern is found, without emitting any data. The pattern that we use is a single dot, which will match any character.

If the file is found to be non-binary and if it contains at least one character, the name of the file is printed.

If you feel brave, you can plug your flip -u into it as well:

find . -type f -exec grep -I -q . {} \; -print -exec flip -u {} \; 

1 Fun fact: Technically, a binary file on Unix is any file that doesn't end with a newline character.

find . -type f -exec grep -I -q . {} \; -print 

This will find all regular files (-type f) in the current directory (or below) that grep thinks are non-empty and non-binary.

It uses grep -I to distinguish between binary and non-binary files. The -I flag and will cause grep to exit with a non-zero exit status when it detects that a file is binary. A "binary" file is, according to grep, a file that contains character outside the printable ASCII range1.

The -q option to grep will cause it to quite with a zero exit status if the given pattern is found, without emitting any data. The pattern that we use is a single dot, which will match any character.

If the file is found to be non-binary and if it contains at least one character, the name of the file is printed.

If you feel brave, you can plug your flip -u into it as well:

find . -type f -exec grep -I -q . {} \; -print -exec flip -u {} \; 

1 Fun fact: Technically, a binary file on Unix is any file that doesn't end with a newline character.

find . -type f -exec grep -I -q . {} \; -print 

This will find all regular files (-type f) in the current directory (or below) that grep thinks are non-empty and non-binary.

It uses grep -I to distinguish between binary and non-binary files. The -I flag and will cause grep to exit with a non-zero exit status when it detects that a file is binary. A "binary" file is, according to grep, a file that contains character outside the printable ASCII range.

The -q option to grep will cause it to quit with a zero exit status if the given pattern is found, without emitting any data. The pattern that we use is a single dot, which will match any character.

If the file is found to be non-binary and if it contains at least one character, the name of the file is printed.

If you feel brave, you can plug your flip -u into it as well:

find . -type f -exec grep -I -q . {} \; -print -exec flip -u {} \; 
added 44 characters in body
Source Link
Kusalananda
  • 356.2k
  • 42
  • 737
  • 1.1k
find . -type f -exec grep -I -q . {} \; -print 

This will find all regular files (-type f) in the current directory (or below) that grep thinks are non-empty and non-binary.

It uses grep -I to distinguish between binary and non-binary files,. The -I flag and will cause itgrep to exit with a non-zero exit status when it detects that a file is binary. A "binary" file is, according to grep, a file that contains character outside the printable ASCII range1.

The -q option to grep will cause it to quite with a zero exit status if the given pattern is found, without emitting any data. The pattern that we use is a single dot, which will match any character.

If the file is found to be non-binary and if it contains at least one character, the name of the file is printed.

If you feel brave, you can plug your flip -u into it as well:

find . -type f -exec grep -I -q . {} \; -print -exec flip -u {} \; 

1 Fun fact: Technically, a binary file on Unix is any file that doesn't end with a newline character.

find . -type f -exec grep -I -q . {} \; -print 

This will find all regular files in the current directory (or below) that are non-empty and non-binary.

It uses grep -I to distinguish between binary and non-binary files, and will cause it to exit with a non-zero exit status when it detects that a file is binary. A "binary" file is, according to grep, a file that contains character outside the printable ASCII range1.

The -q option to grep will cause it to quite with a zero exit status if the given pattern is found, without emitting any data. The pattern that we use is a single dot, which will match any character.

If the file is found to be non-binary and if it contains at least one character, the name of the file is printed.

If you feel brave, you can plug your flip -u into it as well:

find . -type f -exec grep -I -q . {} \; -print -exec flip -u {} \; 

1 Fun fact: Technically, a binary file on Unix is any file that doesn't end with a newline character.

find . -type f -exec grep -I -q . {} \; -print 

This will find all regular files (-type f) in the current directory (or below) that grep thinks are non-empty and non-binary.

It uses grep -I to distinguish between binary and non-binary files. The -I flag and will cause grep to exit with a non-zero exit status when it detects that a file is binary. A "binary" file is, according to grep, a file that contains character outside the printable ASCII range1.

The -q option to grep will cause it to quite with a zero exit status if the given pattern is found, without emitting any data. The pattern that we use is a single dot, which will match any character.

If the file is found to be non-binary and if it contains at least one character, the name of the file is printed.

If you feel brave, you can plug your flip -u into it as well:

find . -type f -exec grep -I -q . {} \; -print -exec flip -u {} \; 

1 Fun fact: Technically, a binary file on Unix is any file that doesn't end with a newline character.

added 22 characters in body
Source Link
Kusalananda
  • 356.2k
  • 42
  • 737
  • 1.1k
find . -type f -exec grep -I -q . {} \; -print 

This will find all regular files in the current directory (or below) that are non-empty and non-binary.

It uses grep -I to distinguish between binary and non-binary files, and will cause it to exit with a non-zero exit status when it detects that a file is binary. A "binary" file is, according to grep, a file that contains character outside the printable ASCII range1.

The -q option to grep will cause it to quite with a zero exit status if the given pattern is found, without emitting any data. The pattern that we use is a single dot, which will match any character.

If the file is found to be non-binary and if it contains at least one character, the name of the file is printed.

If you feel brave, you can plug your flip -u into it as well:

find . -type f -exec grep -I -q . {} \; -print -exec flip -u {} \; 

1 Fun fact: Technically, a binary file on Unix is any file that doesn't end with a newline character.

find . -type f -exec grep -I -q . {} \; -print 

This will find all regular files in the current directory (or below) that are non-empty and non-binary.

It uses grep -I to distinguish between binary and non-binary files, and will cause it to exit with a non-zero exit status when it detects that a file is binary. A "binary" file is a file that contains character outside the printable ASCII range1.

The -q option to grep will cause it to quite with a zero exit status if the given pattern is found, without emitting any data. The pattern that we use is a single dot, which will match any character.

If the file is found to be non-binary and if it contains at least one character, the name of the file is printed.

If you feel brave, you can plug your flip -u into it as well:

find . -type f -exec grep -I -q . {} \; -print -exec flip -u {} \; 

1 Fun fact: Technically, a binary file on Unix is any file that doesn't end with a newline character.

find . -type f -exec grep -I -q . {} \; -print 

This will find all regular files in the current directory (or below) that are non-empty and non-binary.

It uses grep -I to distinguish between binary and non-binary files, and will cause it to exit with a non-zero exit status when it detects that a file is binary. A "binary" file is, according to grep, a file that contains character outside the printable ASCII range1.

The -q option to grep will cause it to quite with a zero exit status if the given pattern is found, without emitting any data. The pattern that we use is a single dot, which will match any character.

If the file is found to be non-binary and if it contains at least one character, the name of the file is printed.

If you feel brave, you can plug your flip -u into it as well:

find . -type f -exec grep -I -q . {} \; -print -exec flip -u {} \; 

1 Fun fact: Technically, a binary file on Unix is any file that doesn't end with a newline character.

added 137 characters in body
Source Link
Kusalananda
  • 356.2k
  • 42
  • 737
  • 1.1k
Loading
Source Link
Kusalananda
  • 356.2k
  • 42
  • 737
  • 1.1k
Loading