Re: recursive mv return invalid argument

From: Bill Marcum (bmarcum_at_iglou.com)
Date: 07/03/03


Date: Thu, 3 Jul 2003 05:37:58 -0400

On Wed, 02 Jul 2003 16:40:39 -0400, Ben Thomas
  <bthomas@trey-industries.com> wrote:

> for fff in 'find ./ -type f -name *.txt'; do
> mv -- $fff $fff.bak
> done
>
> GAVE ME THIS:
> mv: when moving multiple files, last argument must be a directory Try `mv
> --help' for more information.

> file in the dir are:
> [bthomas@pippin temp]$ ls -l
> total 12
> -rwxrwxr-x 1 bthomas bthomas 71 Jul 2 15:21 benscript
> -rw-rw-r-- 1 bthomas bthomas 188 Jul 2 14:42 qtest.txt
> -rw-rw-r-- 1 bthomas bthomas 188 Jul 2 10:52 test.txt

ls -al
You probably have a file that begins with '.', or is in a '.*' directory,
and its name contains spaces.

-- 
It is often the case that the man who can't tell a lie thinks he is the best
judge of one.
		-- Mark Twain, "Pudd'nhead Wilson's Calendar"


Relevant Pages

  • Re: Subtracting decimal number
    ... how do I evulate floating number? ... It is often the case that the man who can't tell a lie thinks he is the best judge of one. ... -- Mark Twain, "Pudd'nhead Wilson's Calendar" ...
    (comp.unix.shell)
  • Re: telnet
    ... On Thu, 26 Jun 2003 20:58:56 GMT, GALVANO ... judge of one. ... -- Mark Twain, "Pudd'nhead Wilson's Calendar" ...
    (comp.unix.shell)