Page 1 of 1

Unexpected results - [Solved]

Posted: 29 May 2017, 15:58
by Ed_P

Code: Select all

guest@porteus:~$ ls -sh /mnt/sda6/porteus3.2/Modules/flashplayer-plugin-test*.*
7.2M /mnt/sda6/porteus3.2/Modules/flashplayer-plugin-test-99.99.xzm*
guest@porteus:~$ mv /mnt/sda6/porteus3.2/Modules/flashplayer-plugin-test*.* /mnt/sda6/porteus3.2/Modules/flashplayer-plugin-test*.xyzm
guest@porteus:~$ ls -sh /mnt/sda6/porteus3.2/Modules/flashplayer-plugin-test*.*
7.2M /mnt/sda6/porteus3.2/Modules/flashplayer-plugin-test*.xyzm*
guest@porteus:~$ 
:shock:
I was expecting the renamed module to be flashplayer-plugin-test-99.99.xyzm not flashplayer-plugin-test*.xyzm. Am I missing something? I see nothing in mv --help that helps.

Re: Unexpected results

Posted: 30 May 2017, 01:12
by fulalas
Try this:

Code: Select all

rename xzm xyzm flashplayer-plugin-test*.xzm

Re: Unexpected results

Posted: 30 May 2017, 05:11
by Ed_P
^ Thank you fulalas. I will let you know how I do. Is "rename" a Porteus command or a bash command?

Re: Unexpected results

Posted: 30 May 2017, 06:17
by Ed_P

Code: Select all

guest@porteus:~$ rename xzm xyzm /mnt/sda6/porteus3.2/Modules/flashplayer-plugin-test*
guest@porteus:~$ ls /mnt/sda6/porteus3.2/Modules/*test*
/mnt/sda6/porteus3.2/Modules/flashplayer-plugin-test-99.99\ .xyzm*
guest@porteus:~$ 
A problem with the "\ " part of the "test-99.99\ .xyzm" file name.


-update-

But the addition of the -v option seems to have corrected the problem. :pardon:

Code: Select all

guest@porteus:~$ ls -sh /mnt/sda6/porteus3.2/Modules/flashplayer-plugin-test*.*
7.2M /mnt/sda6/porteus3.2/Modules/flashplayer-plugin-test-99.99.xzm*
guest@porteus:~$ rename -v xzm xyzm /mnt/sda6/porteus3.2/Modules/flashplayer-plugin-test* 
`/mnt/sda6/porteus3.2/Modules/flashplayer-plugin-test-99.99.xzm' -> `/mnt/sda6/porteus3.2/Modules/flashplayer-plugin-test-99.99.xyzm'
guest@porteus:~$ ls -sh /mnt/sda6/porteus3.2/Modules/flashplayer-plugin-test*.*
7.2M /mnt/sda6/porteus3.2/Modules/flashplayer-plugin-test-99.99.xyzm*
guest@porteus:~$ 

Re: Unexpected results

Posted: 30 May 2017, 08:36
by fulalas
But you're trying with just a '*' in the end. What about the way I told you?

Regarding -v parameter, wow! I thought it was just for outputting what's being done :unknown:

Re: Unexpected results

Posted: 30 May 2017, 13:53
by Ed_P
fulalas wrote:But you're trying with just a '*' in the end. What about the way I told you?
Well, if you had told someone who follows instructions to the letter, literally:

Code: Select all

guest@porteus:~$ ls /mnt/sda6/porteus3.2/Modules/*test*
/mnt/sda6/porteus3.2/Modules/flashplayer-plugin-test-99.99.xzm*
guest@porteus:~$ rename xzm xyzm /mnt/sda6/porteus3.2/Modules/flashplayer-plugin-test*.xzm
guest@porteus:~$ ls /mnt/sda6/porteus3.2/Modules/*test*
/mnt/sda6/porteus3.2/Modules/flashplayer-plugin-test-99.99.xyzm*
guest@porteus:~$ 
it would have worked as expected. But then there's me. :oops:

Thank you futalas. :beer:

Re: Unexpected results - [Solved]

Posted: 30 May 2017, 18:30
by fulalas
Great! :)