Technical issues/questions of an intermediate or advanced nature.
-
Ed_P
- Contributor
- Posts: 8369
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
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:~$
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
Ed_P
-
fulalas
- DEV Team
- Posts: 2050
- Joined: 26 Oct 2016, 15:34
- Distribution: Porteus
- Location: Brazil
Post#2
by fulalas » 30 May 2017, 01:12
Try this:
Code: Select all
rename xzm xyzm flashplayer-plugin-test*.xzm
fulalas
-
Ed_P
- Contributor
- Posts: 8369
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
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
Ed_P
-
Ed_P
- Contributor
- Posts: 8369
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
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.
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
Ed_P
-
fulalas
- DEV Team
- Posts: 2050
- Joined: 26 Oct 2016, 15:34
- Distribution: Porteus
- Location: Brazil
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
fulalas
-
Ed_P
- Contributor
- Posts: 8369
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
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.
Thank you
futalas.
Ed
Ed_P
-
fulalas
- DEV Team
- Posts: 2050
- Joined: 26 Oct 2016, 15:34
- Distribution: Porteus
- Location: Brazil
Post#7
by fulalas » 30 May 2017, 18:30
Great!
fulalas