• General Linux Chat and Small Questions v.2
    2,323 replies, posted
[QUOTE=Boris-B;31200771]I remember doing something similar with sed a while back to rename a bunch of AVIs. It was a bit hacky, but it worked. I'll try to see if I can find it. [editline]18th July 2011[/editline] From what I recall, I piped ls into sed where I forged a bunch of mv commands with search and replace using the explicit print option (forgot the name this is my best guess) Then I piped those to awk where I executed them. [editline]19th July 2011[/editline] Ok, I think I managed to recreate it. First, run this: ( it should make no changes as it echos the command it should be performing. [code] ls | sed -nr 's/^[0-9]{3} - (.+)\.mp3$/mv '\''\0'\'' '\''\1.mp3'\''/p' | awk '{system("echo \""$0 "\"")}' [/code] If it's good you should be able to run this: [code] ls | sed -nr 's/^[0-9]{3} - (.+)\.mp3$/mv '\''\0'\'' '\''\1.mp3'\''/p' | awk '{system($0)}' [/code][/QUOTE] Yours worked nice, however it only removes the the first numbers at the beginning of the name, I want it to remove the date in the parentheses too. EDIT: Heh, I edited a bit and I got it to work. Thanks a lot!
How do I connect to my internet connection (Ethernet) through terminal? (I'm on the server edition of Ubuntu)
[QUOTE=gman_beeman;31212482]How do I connect to my internet connection (Ethernet) through terminal? (I'm on the server edition of Ubuntu)[/QUOTE] I'm not completely sure of what software Ubuntu uses to establish wired connections but for me it's always auto-connected using DHCP. I think.
Usually with (as root): [code]dhcpcd ifconfig eth0 up[/code]
Every time I try to install Java, I get this message "E: Package 'sun-java6-jre' has no installation candidate"
Running Debian? You'll need to add non-free to your sources.list, since that's where the sun-java6-jre package is. In Ubuntu, it's probably in universe or multiverse. Alternatively, you can install openjdk-6-jre, which is fully free. (It's based on Sun's GPL release of Java.) [editline]19th July 2011[/editline] Oh, silly me, you said a few posts ago that you're running Ubuntu.
Does anyone have recommendations for fast, lightweight web browsers? I'm currently using Chromium, but my netbook struggles with it sometimes. I'm not interested in a spartan text-only browser or anything like that.
[QUOTE=Larikang;31219739]Does anyone have recommendations for fast, lightweight web browsers? I'm currently using Chromium, but my netbook struggles with it sometimes. I'm not interested in a spartan text-only browser or anything like that.[/QUOTE] Elinks/links/links2 is nice. But really Chromium is probably the best, the only thing that bugs me is the non-native UI..It clashes with GTK themes quite badly D: [url]https://wiki.archlinux.org/index.php/Lightweight_Applications#Web_Browsers[/url] That list there might be worth looking at.
I hate when my clock drifts. Hopefully I've fixed it this time.
[QUOTE=Lyoko774;31220307]Elinks/links/links2 is nice. But really Chromium is probably the best, the only thing that bugs me is the non-native UI..It clashes with GTK themes quite badly D: [url]https://wiki.archlinux.org/index.php/Lightweight_Applications#Web_Browsers[/url] That list there might be worth looking at.[/QUOTE] Ugh, can't stand the UI
I'm trying out several distributions from a Live USB because I found a tool to put multiple linux live distributions on one disk. I'm now on Ubuntu, I've noticed that the firefox on the Ubuntu liveUSB starts way faster than the firefox on my native Arch Linux. Why is that? Why does firefox on Arch Linux take like half a minute to start up (cold startup) while for ubuntu it takes 5 seconds max? Eventually it comes down to this question: How do I speed up program startup?
do you have any add-ons installed on ff in arch?
[QUOTE=FPtje;31227836]I'm trying out several distributions from a Live USB because I found a tool to put multiple linux live distributions on one disk. I'm now on Ubuntu, I've noticed that the firefox on the Ubuntu liveUSB starts way faster than the firefox on my native Arch Linux. Why is that? Why does firefox on Arch Linux take like half a minute to start up (cold startup) while for ubuntu it takes 5 seconds max? Eventually it comes down to this question: How do I speed up program startup?[/QUOTE] preload/prelink ?
[QUOTE=Gaza Pen Pal;31230786]do you have any add-ons installed on ff in arch?[/QUOTE] Well yeah, but I'm mainly using chromium which is equally slow. Thunderbird is this slow as well.
Your HDD is so slow slow as balls I'd assume
Back again with yet another question, when I run the minecraft server starter via putty, it starts in putty, and when I exit Putty, it crashes the server. How do I prevent this?
[QUOTE=gman_beeman;31231457]Back again with yet another question, when I run the minecraft server starter via putty, it starts in putty, and when I exit Putty, it crashes the server. How do I prevent this?[/QUOTE] Use screen. Or this. [url]http://www.minecraftwiki.net/wiki/Server_startup_script[/url]
[QUOTE=gman_beeman;31231457]Back again with yet another question, when I run the minecraft server starter via putty, it starts in putty, and when I exit Putty, it crashes the server. How do I prevent this?[/QUOTE] When you disconnect from SSH it sends a HANGUP signal to all the processes you started from that shell. You can start the minecraft server with [code]nohup java -jar minecraft_server.jar[/code] And it will ignore the HANGUP signal.
[B]OR[/B] you could run it in screen or equiv.
So-o, I rooted my Droid 2 and have been playing around with it. Droid 2 uses modified Linux, of course. Installed Busybox, and to my horror discovered that Busybox includes no GNU Nano, and only vi. So, had to learn to use vi, when I'd always been in this thread bitching about how Nano is much simpler. It's not actually all that bad. Also the default shell sucked, so I installed bash shell in its place. Someone want to let me know: [b]/bin/sh[/b] is the shitty shell that doesn't support command history, or left-arrow key to change a command, and [b] /bin/bash[/b] is the one that does support those, right?
Does anyone have any ideas for a good linux honeypot program?
gonna get linux mint 11 on virtualbox and then go on all the crazy russian porn sites I can find.
[QUOTE=Elecbullet;31233559]discovered that Busybox includes no GNU Nano, and only vi[/QUOTE] vi is in the POSIX standard, it [B]has[/B] to be included. Busybox is a fairly self-contained minimal environment, of course it doesn't include pointless utilities like a large shell like bash. What prompted you to use it in the first place?
[QUOTE=Elecbullet;31233559]So-o, I rooted my Droid 2 and have been playing around with it. Droid 2 uses modified Linux, of course. Installed Busybox, and to my horror discovered that Busybox includes no GNU Nano, and only vi. So, had to learn to use vi, when I'd always been in this thread bitching about how Nano is much simpler. It's not actually all that bad. Also the default shell sucked, so I installed bash shell in its place. Someone want to let me know: [b]/bin/sh[/b] is the shitty shell that doesn't support command history, or left-arrow key to change a command, and [b] /bin/bash[/b] is the one that does support those, right?[/QUOTE] /bin/sh isn't a shell really. It's a symlink to an actual shell. On a desktop Linux /bin/sh is a symlink to /bin/bash I don't know what the shell Busybox uses though. [editline]20th July 2011[/editline] Wikipedia says Busybox uses the ASH Shell [url]http://en.wikipedia.org/wiki/Ash_shell[/url]
Oh, no no no, the default shell for the Droid itself. That's [i]before[/i] Busybox was installed. [quote]Originally it did not feature line editing[clarification needed] or command history mechanisms, because Almquist felt that such should be moved into the terminal driver; however, current variants support it.[/quote] The main problem I had was that the default Droid shell did NOT support command history or line editing, so I don't think that's the shell it was using. I'd type: [code]wget http://192.168.1.10/homepage.html[/code] And, having forgotten to enter the "busybox" before "wget", I had to delete the entire command, because I couldn't hit left arrow to change it. Thanks for the info though. [editline]20th July 2011[/editline] [QUOTE=esalaka;31233817]vi is in the POSIX standard, it [B]has[/B] to be included. Busybox is a fairly self-contained minimal environment, of course it doesn't include pointless utilities like a large shell like bash. What prompted you to use it in the first place?[/QUOTE] Well I SSH'd in using SSHDroid Pro so i could do various things. One thing I did try was writing my own personal homepage for the Droid phone. I have a [url=http://www.stephenl.net/homepage]homepage[/url] for my PC that is [i]extremely[/i] useful, and I wrote an extremely slimmed down version for my Droid. You can find that [url=http://www.stephenl.net/homepage.html]here[/url], however I have it stored locally on my Droid for instant access.
[QUOTE=PvtCupcakes;31232389]When you disconnect from SSH it sends a HANGUP signal to all the processes you started from that shell. You can start the minecraft server with [code]nohup java -jar minecraft_server.jar[/code] And it will ignore the HANGUP signal.[/QUOTE] That worked thanks, but how do I shut down the server?
You'll have to kill the process. That's why I prefer to use screen. You can access the console at any time and you can even send it commands with a script. Plus even more amazing shit.
[QUOTE=Boris-B;31239369]You'll have to kill the process. That's why I prefer to use screen. You can access the console at any time and you can even send it commands with a script. Plus even more amazing shit.[/QUOTE] Yeah, I'll probably switch to screen, because I can't actually input any commands via Putty, and that's the main reason I set up the entire SSH thing in the first place. Also, this doesn't really belong here, but seeing as my server has 8GB of RAM, should I run the server with the parameters with -Xmx7168M -Xms7168M (7GB leaving 1GB for other stuff) or just -Xmx1024M -Xms1024M?
Anyone have a way to hide the cursor in xfce on arch (preferably from a hotkey)? Whenever steam is open in wine; steam disallows the cursor to hide in games.
[QUOTE=gman_beeman;31239305]That worked thanks, but how do I shut down the server?[/QUOTE] His advice was not very good, use screen instead it's much better in this case, seeing as you have to resume your session. [code] screen minecraft stuff here [/code] And then you're good, losing connection, etc nothing terrible happens. Now, when you SSH back in to get back to the screen when you SSH again: [code] screen -r [/code] Just recently learned how to do this, screens a really great tool.
Sorry, you need to Log In to post a reply to this thread.