From: Phred Phungus on

I ran this command in the place where I keep my c source files, with a
subdirectory named backups1. It seemed to work, but what am I to think
of the files with the tilde after it?

http://i46.tinypic.com/15wb2io.png

Why didn't they get moved like the other files, as they also match the
regex.

Thanks for your comment and cheers,
--
fred
From: Thad Floryan on
On 3/7/2010 10:54 PM, Phred Phungus wrote:
>
> I ran this command in the place where I keep my c source files, with a
> subdirectory named backups1. It seemed to work, but what am I to think
> of the files with the tilde after it?

Those appear to be previous-version backup copies of files
edited using emacs.

> http://i46.tinypic.com/15wb2io.png
>
> Why didn't they get moved like the other files, as they also match the
> regex.

No they do not. The tilde is a part of the filename.

What you might want to do is:

$ mv *.c *.c~ backups1/

probably "safer" is:

$ mv *.c* backups1/

From: Greg Russell on
In news:7vjla0Fid1U1(a)mid.individual.net,
Phred Phungus <Phred(a)example.invalid> typed:

> I ran this command in the place where I keep my c source files, with a
> subdirectory named backups1. It seemed to work, but what am I to
> think of the files with the tilde after it?
>
> http://i46.tinypic.com/15wb2io.png
>
> Why didn't they get moved like the other files, as they also match the
> regex.

"*.c~" most certainly does NOT match "*.c", as the tilde is a character that
is not included in the regexp.


From: Phred Phungus on
Greg Russell wrote:
> In news:7vjla0Fid1U1(a)mid.individual.net,
> Phred Phungus <Phred(a)example.invalid> typed:
>
>> I ran this command in the place where I keep my c source files, with a
>> subdirectory named backups1. It seemed to work, but what am I to
>> think of the files with the tilde after it?
>>
>> http://i46.tinypic.com/15wb2io.png
>>
>> Why didn't they get moved like the other files, as they also match the
>> regex.
>
> "*.c~" most certainly does NOT match "*.c", as the tilde is a character that
> is not included in the regexp.
>
>

Right. I was thinking that i was grep'ing with \\.c , which, I htink,
would have been different.
--
fred
From: Phred Phungus on
Thad Floryan wrote:
> On 3/7/2010 10:54 PM, Phred Phungus wrote:
>> I ran this command in the place where I keep my c source files, with a
>> subdirectory named backups1. It seemed to work, but what am I to think
>> of the files with the tilde after it?
>
> Those appear to be previous-version backup copies of files
> edited using emacs.

I just use the text editor that ubuntu gives me out of the box.
>
>> http://i46.tinypic.com/15wb2io.png
>>
>> Why didn't they get moved like the other files, as they also match the
>> regex.
>
> No they do not. The tilde is a part of the filename.
>
> What you might want to do is:
>
> $ mv *.c *.c~ backups1/
>
> probably "safer" is:
>
> $ mv *.c* backups1/
>

Thx all for replies. I'll enter this into my linuxlog.

I went ahead and just went

rm *.c~

, because I didn't really want the backups to get backed up.
--
fred