« first day (2468 days earlier)      last day (2469 days later) » 
00:00 - 16:0016:00 - 00:00

12:15 AM
@derobert Well, I'm getting the error:
> Unable to complete install: 'unsupported configuration: CPU mode 'custom' for x86_64 kvm domain on x86_64 host is not supported by hypervisor'
with virt-manager.
I think I checked something called "custom" somewhere. But then I unchecked it.
I switch to "copy host CPU configuration". I'm now getting:
> Unable to complete install: 'internal error: process exited while connecting to monitor: Could not access KVM kernel module: Permission denied
failed to initialize KVM: Permission denied'
Do I need to add myself to the kvmgroup too?
 
12:45 AM
This time tried this as root:
> Unable to complete install: 'internal error: process exited while connecting to monitor: 1,disable-ticketing,image-compression=off,seamless-migration=on -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pci.0,addr=0x2 -device intel-hda,id=sound0,bus=pci.0,addr=0x4 -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -chardev spicevmc,id=charredir0,name=usbredir -device usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=1 -chardev spicevmc,id=charredir1,name=usbredir -device usb-redir,chardev=charredir1,id=redir1,bus=usb.0,p
BTW, I tried to use an unmounted LV as device. I don't know if that's ok.
lsmod | grep kvm
kvm_amd              2179072  0
kvm                   589824  1 kvm_amd
irqbypass              16384  1 kvm
 
 
6 hours later…
7:12 AM
@derobert Never mind, I figured out one needs to add a VG as a new "pool".
 
 
2 hours later…
9:26 AM
Still seeing that KVM module error. I wonder if I should ask a question.
 
 
2 hours later…
11:51 AM
@daniel.neumann Hello
I'm afraid to make that post too board.I don't sure I should edit it or not..
Can I ask you some question here?
 
@yode You can't ping people in chat unless they have been in the room in the past two weeks. If you want to invite someone to chat, leave a comment under their question or answer and ask them to come here.
 
@terdon Oh,Thanks. I am first in here indeed. :)
 
@yode No worries. What post is this about?
 
2
Q: How can I count the number of CPU cores?

yodeOf course we know cat /proc/cpuinfo |grep "cpu cores" will give a output [root@14:47 ~]# cat /proc/cpuinfo |grep "cpu cores" cpu cores : 2 cpu cores : 2 cpu cores : 2 cpu cores : 2 But actually I want to get the total number of cpu cores.I mean I hope the result is cp...

 
And by the way, you never need cat file | grep foo you can always fo grep foo file
So your answer would be grep -c "cpu cores" /proc/cpuinfo
 
11:56 AM
I post a question about how to sum that core number,but the follow answer give me a lot of information about hardware
 
or just grep -c proc /proc/cpuinfo
terdon@tpad ~ $ grep -c proc /proc/cpuinfo
8
terdon@tpad ~ $ grep -c "cpu cores" /proc/cpuinfo
8
 
Aha~Thank poinit out..
I just confusing.Any PC can have a lot of socket?
 
@yode no, typically just workstations and servers
 
Also, @yode Daniel is essentially asking if you want the number of physical CPU chips (what you would count if you opened your machine) or the number of CPUs those chips have (most today have >1) or the number of cores the machine will see (most CPUs have multiple cores)
 
@terdon there’s also logical cores v. physical cores to consider
 
11:59 AM
@StephenKitt That's what I meant by the third point above. Could have expressed it better, I know.
 
@terdon ah OK, because some packages contain multiple CPU dies, and I thought that was your second point
 
The reason I confusing this question is:

1.my CentOS6.3 is on Wmare
2.the lscpu command is don't work on my *bash on windows*
 
SO on my laptop, I have one physical chip (i7-6820HQ) which has 4 physical cores, each of which has 2 logical cores (@StephenKitt please correct me if I'm wrong).
 
So I don't know the lscpu should give what in my pc
 
@terdon that’s accurate enough ;-)
 
12:01 PM
This means that in practical terms, I can run 8 processes in parallel each of which will get a full "CPU" and that is why I get 8 when looking at /proc/cpuinfo:
$ grep -c proc /proc/cpuinfo
8
@yode What does it give?
 
@terdon
 
OK, so you have 4.
But you were talking about lscpu
 
@terdon You "chips" mean "socket"?
 
@yode Kinda. A socket is where the chip goes but yes.
This is a socket:
And here's a chip going into the socket:
 
Thanks for vivid lesson for me.I'm very moving..
 
12:07 PM
You're welcome.
 
maybe last confusion.The nproc will give a number of total thread?
 
Yes. To test all this, just compare the output to what you see in lscpu.
 
And the number of total thread is equivalent with CPU(s) in command lscpu?
 
Should be, yes.
 
Thanks....I almost know it this time I thinks. :) @terdon
 
12:12 PM
Yay! :)
 
12:32 PM
@FaheemMitha probably need to add some user to group kvm
$ members kvm
libvirt-qemu anthony
is what I have here, but I'm not sure my user is actually required
the VM should be running as libvirt-qemu
It's just libvirt-qemu on another box, so yeah, that should be all that's required
ls -l /dev/kvm might shed some light on it too
And, yes, probably worth a question, to document it for the next person.
 
1:00 PM
@derobert I'm now doing this as root.
 
libvirt doesn't run VMs as root.
 
members kvm
libvirt-qemu
@derobert It doesn't?
 
@FaheemMitha thankfully no
 
ls -l /dev/kvm
crw-rw----+ 1 root kvm 10, 232 Jul 4 04:38 /dev/kvm
@derobert It should throw a error or something, then.
 
Crazy!There is a roboot is improving my post?
2
Q: How can I count the number of CPU cores?

yodeOf course we know cat /proc/cpuinfo |grep "cpu cores" will give an output [root@14:47 ~]# cat /proc/cpuinfo |grep "cpu cores" cpu cores : 2 cpu cores : 2 cpu cores : 2 cpu cores : 2 But actually I want to get the total number of cpu cores. I want the result to be cpu ...

 
1:02 PM
@yode Odd. Link to the actual edit?
 
@yode No, Community means someone who is not logged in.
 
Try making an edit if you are not logged in. If accepted, it will be credited to Community.
 
Oh,I was stonish a roboot have such intelligence..
 
The review page makes it clearer: "proposed 13 mins ago by an anonymous user"
 
1:03 PM
@yode I think you mean robot. From the Czech.
from Czech, from robota ‘forced labour’. The term was coined in K. Čapek's play R.U.R. ‘Rossum's Universal Robots’ (1920).
 
Somebody likes etymonline :)
 
Sorry,that is a typo actually.my English is very poor. :)
 
That was before Asimov.
@terdon ?
First hit by Google. I'm just a Slave To Google.
 
@FaheemMitha remember virt-manager is just a frontend to libvirt—libvirt is what is actually running the VM. What user you run virt-manager doesn't change that.
 
Googslave?
@derobert I think I hate frontends. They turn me into a Microsoft User.
 
1:05 PM
Gooslave?
 
@derobert Or that.
 
@FaheemMitha Searching for what?
 
@terdon robot.
Has anyone read RUR? It's a good play. Quite modern.
 
Ah, OK, I see it now.
 
@FaheemMitha Well, you can always try virsh --connect qemu:///system ...
 
1:06 PM
Of course, I can't read Czech. I read it in translation.
 
@derobert Is that functionally equivalent?
 
@FaheemMitha Well, it has a lot more functions, actually. It's the CLI libvirt client. As opposed to virt-manager, which is a GUI libvirt client
 
@derobert Yes, I see.
So these things can't be run as root? But if so, it virt-manager should say something.
It didn't.
 
@FaheemMitha the managers/clients can run as root (but shouldn't need to)
 
1:09 PM
@derobert I was getting that error as root. But I'm confused. You said earlier that libvirt couldn't run as root.
 
But libvirt starts the VMs as a user specified in its config, which should be non-root
 
8 mins ago, by derobert
libvirt doesn't run VMs as root.
@derobert Oh, and if that user doesn't have access, it throws an error?
 
libvirt is the server. virt-manager is the client. libvirt is what actually runs the VM; virt-manager is a client that connects to libvirt to give it commands
 
@derobert Ok. Sorry if I'm being dense. I had a tiresome afternoon. Trying to figure out taxes. :-(
So does libvirt not have a dedicated user, then? Like apache?
/etc/libvirt/libvirt.conf doesn't show anything about users.
 
@FaheemMitha It has a few, libvirt-qemu is the one for running qemu/kvm
 
1:13 PM
But libvirt-qemu is a member of kvm. Is that not sufficient? Or is virt-manager not running as libvirt-qemu?
 
That should be sufficient....
 
@derobert Still getting an error, though.
Should I ask a question?
 
Check if dmesg has anything.
 
And should I start virt-manager as root, or not? Does it make a difference?
 
You shouldn't run it as root. There is no need to.
 
1:14 PM
@derobert The logs had some stuff. One sec.
@derobert Ok, noted.
[   13.872062] kvm: Nested Virtualization enabled
[   13.872066] kvm: Nested Paging enabled
Thats from dmesg ^^.
 
so nothing relevant, then
you could try systemctl restart libvirtd.service .... maybe it got started before being added to the group?
 
@derobert What strings should I search for? libvirt as well?
 
I'd just see if any new messages appear when trying to start the VM
 
@derobert Ok.
In messages or syslog?
 
or the journal
(which should pick up all those sources)
 
1:17 PM
> Jul 12 05:39:52 orwell libvirtd[20045]: 2017-07-12 00:09:52.408+0000: 20046: error : qemuConnectGetDomainCapabilities:19016 : invalid argument: KVM is not supported by '/usr/bin/kvm' on this host
I don't know what that means, but it looks relevant.
And there's some stuff about CPU, which goes away if one chooses the same as host.
> Jul 12 05:42:18 orwell libvirtd[20045]: 2017-07-12 00:12:18.272+0000: 20047: error : qemuProcessUpdateGuestCPU:5136 : unsupported configuration: CPU mode 'custom' for x86_64 kvm domain on x86_64 host is not supported by hypervisor
But I'll try again, in real time. Sigh.
It's one of those days when it feels less surprising that most people don't run things like Debian.
 
@FaheemMitha odd... if you run /usr/bin/kvm, what happens? I guess maybe nothing if you're not a member of the kvm group, but here it pops up a window and attampts a netboot
 
@derobert Does dmesg update in real time? I thought it was mostly a boot up thing.
@derobert As my user?
 
@FaheemMitha dmesg is real-time.
@FaheemMitha yeah
 
@FaheemMitha and you can use dmesg -w to follow the kernel logs
 
@StephenKitt Ah, thanks for the tip.
@derobert It pops up some kind of console and tries to do a network boot.
And gives up. "No more network devices."
 
1:21 PM
@FaheemMitha so then it's working...
 
Something called iPXE.
 
yeah, I'd restart libvirt
 
@derobert Restart? Why? Would that reset something?
 
Hopefully. All I can guess is that it was started before it got added to the kvm group, so it's not actually running with that group.
 
/etc/init.d/libvirtd restart
[ ok ] Restarting libvirtd (via systemctl): libvirtd.service.
@derobert I don't think I added it to that group manually.
 
1:24 PM
@FaheemMitha Probably a postinst did.
 
@derobert I expect so.
But it's true I didn't reboot after install, so there could be some timing issue.
Or even log out, for that matter.
Should I just reboot, perhaps?
 
shrug you can if you want, I guess. Doubt its needed.
BTW: next time you try to create the VM, have a journalctl -f running to watch the logs
 
@derobert I'm trying to do it now. At least I'm getting a different error:
> libvirtError: missing target information for device /dev/data/libvirt1
 
... how did you set up storage?
 
@derobert I added the VG /dev/data as a pool thingy.
Maybe I did it wrong.
 
1:29 PM
@FaheemMitha which type?
 
@derobert One sec.
 
Right-click QEMU/KVM, Details, Storage
 
Connection details -> Storage -> LVM Volume Group.
 
@FaheemMitha looks something like the above?
 
@derobert Yes, like that.
@FaheemMitha And can I select one of the LVs for my VM?
And does it need to be mounted? Mine aren't.
 
1:32 PM
@FaheemMitha yeah, you'd create one per vm. And they're not mounted on the host, they're used as raw block devices
 
@derobert That's what I thought.
One sec, I'll go through again. journalctl -f can be started as root, right?
 
yeah, or as your user (if you've set that up)
 
@derobert I haven't.
 
if you care: I think it works as a side-effect of enabling the persistent journal, at least if you're a member of the adm group. Instructions are in /usr/share/doc/systemd/README.Debian.gz
 
Getting the kvm error again.
Jul 12 19:05:52 orwell audit[2419]: VIRT_RESOURCE pid=2419 uid=0 auid=4294967295 ses=4294967295 msg='virt=kvm resrc=vcpu reason=start vm="generic" uuid=19d47004-8133-40af-993a-797ea3afdf9b old-vcpu=0 new-vcpu=1 exe="/usr/sbin/libvirtd" hostname=? addr=? terminal=? res=success'
Jul 12 19:05:52 orwell audit[2419]: VIRT_CONTROL pid=2419 uid=0 auid=4294967295 ses=4294967295 msg='virt=kvm op=start reason=booted vm="generic" uuid=19d47004-8133-40af-993a-797ea3afdf9b vm-pid=-1 exe="/usr/sbin/libvirtd" hostname=? addr=? terminal=? res=failed'
That's from journalctl .
Actually, there are a whole bunch of kvm related things at once. Shall I paste somewhere?
 
1:39 PM
yeah
 
@FaheemMitha wrong link
 
@derobert Sorry
The second paste is the relevant one, I think.
 
and where was the KVM error message about permission denied?
 
@derobert All this was from journalctl -f.
The second paste came before the first paste.
But that's clearly the relevant messages.
There is an extensive RH thread about this, going over several years.
And they never did find the problem.
I suppose I could just try the IT Crowd approach to fixing it...
I suppose I could post a question. And the answer might be - have you tried turning it off and on again?
Well, dinner time. Back in a bit...
 
1:47 PM
Some of those search results are about SELinux.
Could be something like that. Not sure if you're running SELinux or Apparmor, etc.
 
@derobert No, neither.
I suppose it's possible they're enabled without me knowing about them
Any simple way to check?
 
I'm sure there is, but don't know off the top of my head
 
I had this one in mind, for example:
Upshot: we have no idea why this is happening.
Really off to eat now.
 
2:18 PM
Well, that bug does have a workaround, rmmod and insmod (or reboot), but I suspect it's RedHat-specific.
 
Hi! Is it okay for me to ask some questions about a network problem on my Debian (9.0.0 Stretch) machine? I don't want to hijack the chat.
 
@FaheemMitha sestatus will tell you your current SELinux mode (first status line and current mode, if any)
@ÉtienneBézout if it's moderately involved, you may get more visibility on the main site than in chat; no harm in asking in chat, just much smaller audience
 
@ÉtienneBézout Questions are really supposed to go on the site... At least if its non-vague-enough to go there
@ÉtienneBézout go ahead and ask it, though, and we can at least quickly tell you if you ought to ask on the site instead
 
It might be a bit vague. My problem is this: When I click on the network manager icon, it says I have a connection, albeit slow (10 Mbs). However, I cannot ping the router. If I lof into the router, the device does appear.
 
What type of connection is this? Wired Ethernet, WiFi, etc.?
 
2:23 PM
This is a wired ethernet connection.
I should add that I couldn't configure the network with dhcp, so I have a static ip.
Also, the hardware is old (might be the cause)
 
Hmm... what does /sbin/ethtool DEVICE say?
where DEVICE is the ethernet device (I think Network Manager gives the name, if not ip link should)
 
is it possible that there's a wifi or other connection that network manager is reporting on instead? (I'm not too familiar with network manager)
 
Also, how old is old? Are we talking pre- or post-late-90s here?
 
I have no ethtool directory under /sbin
It's probably 10-15 years old
 
Hmmm. ethtool package must not be installed. OK, if only 15 years old, that probably means it supports 100mbps mode. Though likely not gigabit.
 
2:27 PM
@JeffSchaller No, there's no other connection.
Yes, initially I had a 100 Mb/s connection, but no ping. After reboot, only 10 Mb/s.
 
@ÉtienneBézout It'd be useful to install ethtool if you can (obviously, without a network connection that's harder!) Also, have you tried a different Ethernet cable?
And of course, I should ask, is the router configured to respond to pings? Just to avoid an "oh... DUH" moment later.
 
The cable should be fine since it worked for another computer. Well, I cannot go out on the internet so it's not a ping issue per se.
Also the lights near the RJ-45 connection on the computer are flashing, which I suppose indicates there is a connection?
 
Right, but a can't get to the Internet could be all kinds of config issues (e.g., firewall rules, NAT rules, wrong gateway...). There can always be multiple issues, unfortunately.
@ÉtienneBézout If the activity light is flashing randomly (not in a fixed pattern), that's probably a good sign. Is there an activity light on the router end as well?
Also, have you double-checked your IP settings? Though I suspect the link isn't working, if DHCP didn't work.
Next thing to check would be ip link ls dev DEVICE to make sure it shows as both UP and LOWER_UP. Other than that ip addr ls dev DEVICE to make sure Network Manager actually configured the IP address on it.
 
I just checked and I can ping the router from another computer on the LAN. Yes, there does appear to be some random flashing. There's also some flashing on the switch, which is connected to my router.
Ok, I'll check those things
 
@ÉtienneBézout Unmanaged switch, correct? This is a home/small business network, not an enterprise one right?
 
2:42 PM
Yes, an unmanaged switch. It's a home network.
 
Ok, good, don't have to worry about weird access control setups then!
 
When I do ip link I get 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 ... 2: enp5so : <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 ...
I also checked /etc/network/interfaces The content is: auto lo \n iface lo inet loopback
When I do ip addr, it seems that my ip is assigned to enp5so but the inerfaces file only lists lo. Could this be the issue?
 
@ÉtienneBézout /etc/network/interfaces isn't used when you configure it with Network Manager.
 
Ah, ok. Is Network Manager the tool that I open by clicking on the icon in the upper right (in the default Debian configuration)?
 
That looks right. enp5so appears to be your device name. It's configured up (UP) and sees a link (LOWER_UP). And if the IP address is right...
@ÉtienneBézout Yeah. Or more technically, Network Manager is the daemon, that is some config tool that talks to the daemon.
 
2:49 PM
Ah, ok. Yes, when I run ip addr the same ip addr is listed for enp5so as the one I see in the router manager.
It is also the correct hostname, so some traffic must have been sent.
 
Hmm... do you have a firewall (iptables) running on this machine? Is it possible you've blocked your traffic?
ip -s link show enp5so ... does that show both TX and RX packets, and also 0 or at least very low errors, dropped, overrun, carrier, and collsns?
 
It's a fresh install and I haven't configured a firewall, so there shouldn't be any.
For RX there are no bytes and no packets, but many errors (~30000). For TX there are no erros.
 
Oh. Well, that'd be the problem....
 
So it means it cannot receive any packets, right?
 
Yeah.
 
2:55 PM
Is it the hardware in the computer?
 
If you had ethtool installed, it's possible ethtool -S enp5so would give more details. But it's most likely a hardware issue. I'd try a different cable before binning the card. Given, an Ethernet card is $10...
A marginal cable might work with one card but not another. So worth trying another cable, if you have one around.
Also take a moment to physically inspect the port: make sure, e.g., there isn't a bunch of lint in it. Or a bent pin.
 
Well, it's not so easy to try a different cable due to the wiring. Also, as I said I tried the cable on other computers (of the same model). One of them got 100 Mb/s and the others got 10 Mb/s. Ok, I'll check the port. Strange though that TX would work but not RX?
 
@ÉtienneBézout Ok, the fact that they're getting different speeds make me really suspect you have a cable issue.
@ÉtienneBézout on 10-BaseT and 100-BaseTX, TX and RX are different wire pairs (inside the same cable)
 
Ah, ok maybe it is a cable issue. It was kind of a poor job when installed with. Small radius of curvature and keystone jack on stranded cable :( Still, worked OK for one computer.
 
@derobert I'd try a reboot first. But let me first ask this. If libvirt was installed, then might it not take a reboot to add libvirt-qemu to the kvm group?
 
3:03 PM
@FaheemMitha That's why I had you restart libvirtd
 
Also, here's what /etc/groupcurrently looks like:
kvm:x:148:
libvirt:x:149:faheem
libvirt-qemu:x:64055:libvirt-qemu
@derobert Yes, but is that sufficient?
 
@derobert Ok, thank you very much for your help! I'll try to get a different cable installed!
 
@ÉtienneBézout I have no idea if anyone makes jacks designed for stranded...
@ÉtienneBézout presumably you can also test this by moving the computer (temporarily) next to the switch, and just use a short patch cable.
 
@derobert Yeah, that's a good idea, I'll try it. Thanks again!
 
They really should move that editing window to 5 minutes.
 
3:06 PM
@ÉtienneBézout BTW: If you're paying someone to run in-wall cabling, they #*@@ ought to do the job right with cat5e or cat6 solid copper. And then prove its done right by testing it with e.g., a Fluke cable tester
 
sestatus
The program 'sestatus' is currently not installed.
 
@FaheemMitha oh, on chat? I think they ought to do something where it's related to how busy the room is. You don't want someone editing a message that's scrolled off screen (or nearly so) where no one will see the edit... 5m can be a lot in an active chat. But less active ones, it'll still be the last or 2nd to last message. So then it'd be OK.
@FaheemMitha That probably means you don't have SELinux at all
 
@dreobert No, I did it myself. I pulled the cable through an old water pipe, and some turns were a bit sharp. I took a risk with it, but since it worked with one computer I thought it was ok.
 
@ÉtienneBézout I'd guess the cable is OK, but your termination is not...
 
@derobert Probably.
@derobert That sounds sensible. But possibly hard to implement in a satisfactory way.
 
3:12 PM
@ÉtienneBézout Also, you might be able to use ethtool to make it work, by setting it to advertise 10mbps only.
 
@derobert Doesn't it seem odd that the kvm line in /etc/groups doesn't mention libvirt-qemu?
 
@FaheemMitha getent passwd libvirt-qemu ... at least here, kvm is its primary group
 
root@orwell:/home/faheem# getent passwd libvirt-qemu
libvirt-qemu:x:64055:148:Libvirt Qemu,,,:/var/lib/libvirt:/bin/false
kvm is 148.
 
yep, so the primary group
getent group faheem won't show you as a member either, because it's your primary group
 
@derobert So, no other ideas with the kvm error? Shall I try rebooting?
 
3:25 PM
@FaheemMitha sure, why not? Only downside is you'll have to close everything you're working on, and then carefully re-set-up 12 desktops worth of xterms... (Can you tell I hate rebooting?)
 
@derobert I don't have that much stuff up at the moment.
 
3:40 PM
@AndyP ping me here if you want to discuss it.
 
@terdon Hello
 
Hi
So, can you show me i) the output of ls | head in the directory with the bad files so I can see a few; ii) the exact command you used to rename them (as in copy/paste from your terminal).
Also, what operating system are you doing this in? And what shell?
(oh, and if you don't have time, don't let me keep you. I pinged you because I had to in order to create your chat account and make sure you could write here. If you're in a rush, don't worry, we can do it another time).
 
@tedron RHEL 6.8 running bash 4.1.2
 
OK. Should work then.
 
yeah, I'm a little stumped. Let me create a test file.
 
3:50 PM
Here, use this command:
touch directory{1,2}\\subdir{1,2}\\subsubdir{1,2}\\filename{1,2}.{txt,jpg}
Run it in a new, empty directory.
 
@tedron Ok, hang on
 
This is about my answer here by the way. Andy ran my command and it apparently created directory names with trailing backslashes. Which is odd.
 
@tedron Still adding backslashes to all directory names. The actual filenames look fine. What did you write the script on?
@tedron this is what I see when I do 'ls'
@tedron directory1\ directory2\
 
Yes. I was afraid of that. You have spaces which you didn't mention.
Right?
 
no spaces
 
3:56 PM
@terdon you really ought to post a link to the question for the rest of us :-/
 
Ah but not if you used the touch command.
 
@tedron no spaces.
 
4 mins ago, by terdon
This is about my answer here by the way. Andy ran my command and it apparently created directory names with trailing backslashes. Which is odd.
:P
@AndyP OK, please show me the exact command you ran.
Copy/paste it here directly from your terminal.
 
@terdon Well, that's what I get for replying before reading the whole thing... :-(
 
@derobert Rebooting fixed whatever it was.
 
3:57 PM
Oh, and I wrote the script on the page I posted it on. It's a trivial script.
 
I dumped your code into a file and named it files.sh
 
@derobert heh :)
 
@FaheemMitha yeah!, I guess?
 
for file in *\\*; do
        dir="$(dirname -- "${file//\\/\/}")"
        filename="${file##*\\}"
        mkdir -p -- "$dir"
        mv -- "$file" "$dir"/"$filename"
done
 
Though I did make another change - I changed the OS detection from manual to automatic.
@derobert Any point writing a question about this?
 
3:58 PM
Let me get a link to the quetion
 
@AndyP OK. That looks right. So how did you run it?
 
@derobert And it's just giving me the installer boot menu. Is that right?
 
@AndyP btw: once you paste that in, type another space then the 'fixed font' button will appear. Delete the extra space and then tap the button. That'll get your paste formatted nicely in chat.
 
1
Q: Looking for a script to convert a filename with backslashes into a directory structure with files

Andy PWe are currently testing a new application on Linux that previously worked on Windows. It appears there were some hard coded paths in the program and a bunch of test files with long filenames with backslashes were created. For example: directory\subdirectory\subdirectory\subdirectory\filename.e...

 
@FaheemMitha yeah, that's what you should be getting. You can then install an OS on your VM
 
3:59 PM
A fresh install seems like a bit of a business every time.
And is 20G enough? That's what my LV is.
 
I made a file in the same directory as the files I need to rename, called it files.sh, gave it chmod 755 and then just typed ./files.sh
 
00:00 - 16:0016:00 - 00:00

« first day (2468 days earlier)      last day (2469 days later) »