6 Improving post formatting.
source | link

You might also be able to find and grep with backquotes to select files for the move command. Pass those into mv.

ieI.e. For hidden files

find Foo -maxdepth 1 | egrep '^Foo/[.]' # Output: .hidden

So

mv `find Foo -maxdepth 1 | egrep '^Foo/[.]'` Bar # mv Foo/.hidden Bar

Moves only selected hidden files into BarBar:

mv `find Foo -maxdepth 1 | egrep '^Foo/.'` Bar # mv Foo/.hidden Foo/notHidden Bar

Moves all files in Foo to Bar since the '.' in the egrep command acts as a wildcard without the square brackets.

The '^'^ character ensures the match starts from the beginning of the line.

Some details of egrepegrep pattern matching can be found here. https://www.gnu.org/software/findutils/manual/html_node/find_html/egrep-regular-expression-syntax.htmlhere.

'maxdepth 1'Using maxdepth 1 stops find from going into subdirectories.

You might also be able to find and grep with backquotes to select files for the move command. Pass those into mv.

ie. For hidden files

find Foo -maxdepth 1 | egrep '^Foo/[.]' # Output: .hidden

So

mv `find Foo -maxdepth 1 | egrep '^Foo/[.]'` Bar # mv Foo/.hidden Bar

Moves only selected hidden files into Bar

mv `find Foo -maxdepth 1 | egrep '^Foo/.'` Bar # mv Foo/.hidden Foo/notHidden Bar

Moves all files in Foo to Bar since the '.' in the egrep command acts as a wildcard without the square brackets.

The '^' character ensures the match starts from the beginning of the line.

Some details of egrep pattern matching can be found here. https://www.gnu.org/software/findutils/manual/html_node/find_html/egrep-regular-expression-syntax.html

'maxdepth 1' stops find from going into subdirectories

You might also be able to find and grep with backquotes to select files for the move command. Pass those into mv.

I.e. For hidden files

find Foo -maxdepth 1 | egrep '^Foo/[.]' # Output: .hidden

So

mv `find Foo -maxdepth 1 | egrep '^Foo/[.]'` Bar # mv Foo/.hidden Bar

Moves only selected hidden files into Bar:

mv `find Foo -maxdepth 1 | egrep '^Foo/.'` Bar # mv Foo/.hidden Foo/notHidden Bar

Moves all files in Foo to Bar since the '.' in the egrep command acts as a wildcard without the square brackets.

The ^ character ensures the match starts from the beginning of the line.

Some details of egrep pattern matching can be found here.

Using maxdepth 1 stops find from going into subdirectories.

5 added 243 characters in body
source | link

You might also be able to find and grep with backquotes to select files for the move command. Pass those into mv.

ie. For hidden files

find Foo -maxdepth 1 | egrep '^Foo/[.]' # Output: .hidden

So

mv `find Foo -maxdepth 1 | egrep '^Foo/[.]'` Bar # mv Foo/.hidden Bar

Moves only selected hidden files into Bar

mv `find Foo -maxdepth 1 | egrep '^Foo/.'` Bar # mv Foo/.hidden Foo/notHidden Bar

Moves all files in Foo to Bar since the '.' in the egrep command acts as a wildcard without the square brackets.

The '^' character ensures the match starts from the beginning of the line.

Some details of egrep pattern matching can be found here. https://www.gnu.org/software/findutils/manual/html_node/find_html/egrep-regular-expression-syntax.html

'maxdepth 1' stops find from going into subdirectories

You might also be able to find and grep with backquotes to select files for the move command. Pass those into mv.

ie. For hidden files

find Foo -maxdepth 1 | egrep '^Foo/[.]' # Output: .hidden

So

mv `find Foo -maxdepth 1 | egrep '^Foo/[.]'` Bar # mv Foo/.hidden Bar

Moves only selected hidden files into Bar

mv `find Foo -maxdepth 1 | egrep '^Foo/.'` Bar # mv Foo/.hidden Foo/notHidden Bar

Moves all files in Foo to Bar since the '.' in the egrep command acts as a wildcard without the square brackets.

You might also be able to find and grep with backquotes to select files for the move command. Pass those into mv.

ie. For hidden files

find Foo -maxdepth 1 | egrep '^Foo/[.]' # Output: .hidden

So

mv `find Foo -maxdepth 1 | egrep '^Foo/[.]'` Bar # mv Foo/.hidden Bar

Moves only selected hidden files into Bar

mv `find Foo -maxdepth 1 | egrep '^Foo/.'` Bar # mv Foo/.hidden Foo/notHidden Bar

Moves all files in Foo to Bar since the '.' in the egrep command acts as a wildcard without the square brackets.

The '^' character ensures the match starts from the beginning of the line.

Some details of egrep pattern matching can be found here. https://www.gnu.org/software/findutils/manual/html_node/find_html/egrep-regular-expression-syntax.html

'maxdepth 1' stops find from going into subdirectories

4 added 35 characters in body
source | link

You might also be able to find and grep with backquotes to select files for the move command. Pass those into mv.

ie. For hidden files

find Foo -maxdepth 1 | egrep '^Foo/[.]' # Output: .hidden

So

mv `find Foo -maxdepth 1 | egrep '^Foo/[.]'` Bar # mv Foo/.hidden Bar

Moves only selected hidden files into Bar

mv `find fooFoo -maxdepth 1 | egrep 'foo'^Foo/.'` Bar # mv Foo/.hidden Foo/notHidden Bar

Moves all files in fooFoo to Bar since the '.' in the egrep command acts as a wildcard without the square brackets.

You might also be able to find and grep with backquotes to select files for the move command. Pass those into mv.

ie. For hidden files

find Foo -maxdepth 1 | egrep '^Foo/[.]' # Output: .hidden

So

mv `find Foo -maxdepth 1 | egrep '^Foo/[.]'` Bar # mv Foo/.hidden Bar

Moves only selected hidden files into Bar

mv `find foo -maxdepth 1 | egrep 'foo/.'` Bar

Moves all files in foo to Bar

You might also be able to find and grep with backquotes to select files for the move command. Pass those into mv.

ie. For hidden files

find Foo -maxdepth 1 | egrep '^Foo/[.]' # Output: .hidden

So

mv `find Foo -maxdepth 1 | egrep '^Foo/[.]'` Bar # mv Foo/.hidden Bar

Moves only selected hidden files into Bar

mv `find Foo -maxdepth 1 | egrep '^Foo/.'` Bar # mv Foo/.hidden Foo/notHidden Bar

Moves all files in Foo to Bar since the '.' in the egrep command acts as a wildcard without the square brackets.

3 added 100 characters in body
source | link
2 [Edit removed during grace period]
source | link
1
source | link