Unexpected results - [Solved]

Technical issues/questions of an intermediate or advanced nature.
Post Reply
User avatar
Ed_P
Contributor
Contributor
Posts: 3161
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Unexpected results - [Solved]

Post#1 by Ed_P » 29 May 2017, 15:58

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.
Ed

fulalas
Contributor
Contributor
Posts: 587
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

Re: Unexpected results

Post#2 by fulalas » 30 May 2017, 01:12

Try this:

Code: Select all

rename xzm xyzm flashplayer-plugin-test*.xzm

User avatar
Ed_P
Contributor
Contributor
Posts: 3161
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: Unexpected results

Post#3 by Ed_P » 30 May 2017, 05:11

^ Thank you fulalas. I will let you know how I do. Is "rename" a Porteus command or a bash command?
Ed

User avatar
Ed_P
Contributor
Contributor
Posts: 3161
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: Unexpected results

Post#4 by Ed_P » 30 May 2017, 06:17

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:~$ 
Ed

fulalas
Contributor
Contributor
Posts: 587
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

Re: Unexpected results

Post#5 by fulalas » 30 May 2017, 08:36

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:

User avatar
Ed_P
Contributor
Contributor
Posts: 3161
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: Unexpected results

Post#6 by Ed_P » 30 May 2017, 13:53

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:
Ed

fulalas
Contributor
Contributor
Posts: 587
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

Re: Unexpected results - [Solved]

Post#7 by fulalas » 30 May 2017, 18:30

Great! :)

Post Reply