Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us $3,400 per month for bandwidth bills alone, and since we don't believe in shoving popup ads to our registered users, we try to make the money back through forum registrations.
«2 »
  • Post
  • Reply
mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




I'm not sure if the following will give me a coaster or not, so I better ask you guys before I try out:

find foldername/ -name *.gpg -ctime -5 -print0 | xargs -0 growisofs -M /dev/cdrw -r '{}' \;

so all those files named *.gpg changed five days ago or fewer will get burned as a session to my DVD-R. That's the idea.

Adbot
ADBOT LOVES YOU

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




bitprophet posted:

Gotta quote the *.gpg lest your shell expand it for you

And, what's the '{}'\; part for? That's usually found when using find -exec, and AFAIK has no meaning when used with xargs, although I could be misremembering things and xargs accepts it too.

Never used growisofs so no idea if those are the right args otherwise

You're right, the '{}'\; is from find -exec. I'm just not sure about this translating to
growisofs 1.gpg, growisofs 2.gpg, growisofs 3.gpg
instead of
growisofs 1.gpg 2.gpg 3.gpg

That is, growisofs burning three sessions instead of one with all three files.

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




Token Female posted:

I've recently started using ubuntu, and am in need of a graphics program. After a cursory look xaralx is the program that I get recommend. I was wondering if there is something better out there, or if this should be satisfactory. I'm used to using photoshop CS on windows.

I've never heard of xaralx, but the obvious contender here is GIMP. The interface is different, and it lacks some features like CYMK-support. Or used to. They've released a new version a couple of days ago, so check it out.

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




I'm on Ubuntu Gutsy 7.10 64-bit since last year and the flash-player is starting to piss me off for good. Is it normal for some embedded videos to work and some simply not? And sometimes it shuts off entirely, disabling all flash content. I've begun to use IE6 with wine just to get some flash-content playing.

So, if I switch to 32-bit, will it be better? Is this only because of that npwrapper-script that makes it possible to run flash on 64-bit?

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




Ashex posted:

Kinda, I was using 64-bit and was having this issue. Try using Opera, as it actually reloads the plugin with each tab so if it stops working, just refresh.

"was using" - aha. But thanks, I forgot how awesome opera is. That reload-trick works sometimes, myspace is still (mostly) unusable.

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




I'm looking for a way to make the following "script" more elegant:


quote:

echo -e "From: calendar@studio\nTo: user@blabla.com\nSubject: Calendar Preview" > email.txt; calendar -A 32 >> email.txt; cat email.txt | msmtp -t

... and by elegant I mean making it work without having to create that email.txt-file. There's gotta be a way to pipe all this to msmtp at once, I just don't know how.

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




covener posted:

code:
echo -e "...Preview" $(calendar -A 32) | msmtp -t

awesome, just what I was hoping for!

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




Grigori Rasputin posted:

What's the best way to rip CDs in ubuntu? EAC is awesome and after a little looking it seems like there might not be anything quite as perfect on linux? I found a guide to set up EAC in WINE if needed.

Ideally I'd just like to write a script so that I can pop a CD in, it will get FreeDB info, rip to V0 and FLAC and then tag them.

Sound Juicer and grip come to mind. Like you I used EAC, but found that Sound Juicer does the job just as well.

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




Hughmoris posted:

If I'm new to Linux, and am interested in teaching myself the very basics of being a sysadmin, should I move away from Ubuntu to something like Fedora, or perhaps another variant?

You could give Arch Linux a try. It's less "user-friendly" and apparently the community is very helpful. Or Gentoo.

On the other hand, there's still lots to learn even when using Ubuntu. Shell-Scripting, User Management, Networking... like any other *nix, you can fully administer it with your shell/editor-combo of choice.

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




Gleng posted:

Whee. Debian 5.0 (Lenny) was officially released today.

I've been running the 64-bit x86 version for months and it's great.

goddammit, that new look is purty! I'll give it a go on my g3, eventually. Nice to see a distro supporting a variety of architectures.

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




I've started using flickr_upload (http://search.cpan.org/~cpb/Flickr-Upload/flickr_upload) to get my pics on flickr. I still have to log in to my account to get the URL for the fullsize picture (e.g. http://farm4.static.flickr.com/3393...63285698b_o.jpg). Any way to retrieve this info from the command-line?

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




I'm looking for a an awk, sed or perl script to extract a random sentence from a given file.

Example:

quote:

Moby-Dick[1] is an 1851 novel by Herman Melville. The story tells the adventures of the wandering sailor Ishmael and his voyage on the whaleship Pequod, commanded by Captain Ahab. Ishmael soon learns that Ahab seeks one specific whale, Moby Dick, a white whale of tremendous size and ferocity. Comparatively few whaleships know of Moby Dick, and fewer yet have encountered him. In a previous encounter, the whale destroyed Ahab's boat and bit off his leg. Ahab intends to take revenge.

random script would extract:

Ahab intends to take revenge.

or

Comparatively few whaleships know of Moby Dick, and fewer yet have encountered him.

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




Thanks guys, that python-script seems to be the most promising. The bash-script from Lucien seems to work as well, but that sed-one-liner from FeloniousDrunk just gives me this:

code:
bash: syntax error near unexpected token `)'
Again, thanks a lot!

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




Ok, so here's the problem: I'm currently generating my email-signature dynamically from my blog's rss, so it always features the latest entry. That works pretty well.

Now what I've started doing is piping that signature-generator to ttytter, a command-line interface to Twitter. This allows me to publish my latest rants to identi.ca and Twitter with the push of a button. I like it a lot.

But I'm a lazy guy and I would like the whole process to be completely automatic. I.e. set up a cron job. But I don't update my blog daily, so for a daily cron job to work properly without spamming Twitter with duplicate links, there should be some sort of check. But how do I do that? I was thinking about mv'ing "signature" to "signature.old" and then somehow do some magic with diff (of which I know next to nothing).

Sorry for being so complicated, thanks for reading. Oh and here's that signature-generator-script:

code:
#!/bin/bash
curl -s http://example.com/rss.xml | \
xpath -q -e '//item[position()=1]/title/text()' > ~/signature; \
echo " " >> ~/signature; \
curl -s http://is.gd/api.php?longurl=$(curl -s http://example.net/rss.xml | \
xpath -q -e '//item[position()=1]/link/text()') >> ~/signature

cat ~/signature | \
tr -d '\r\n' | \
/home/username/bin/ttytter -script -user=example:examplepass
Yeah don't ask about that echo and tr -d - I'm really a noob when it comes to scripting.

mike12345 fucked around with this message at Apr 17, 2009 around 08:36

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




spoon0042 posted:

Assuming the rss isn't dynamically generated you should be able to run curl with an If-Modified-Since header based on the file signature:
code:
curl -s -H "If-Modified-Since: $(date -uR -r ~/signature)" [url]http://example.com/rss.xml[/url]
Then if rss.xml hasn't been updated the result should be empty.

Thanks, I was hoping for something like this. Will give it a try.

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




KarmaticStylee posted:

Not my first shot, I've used Ubuntu. I'm looking for something even lighter than Ubuntu... maybe just to VIM and see a web site

Try Tiny Core Linux, it's pretty "light" (~10 MB).

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




Subedei posted:

I just installed Linux for the first time a few days ago.

This is not terribly important but on distrowatch.com, Ubuntu 8.10 is listed as having programs such as vim 7.1 installed. The package manager tells me they're not installed. What gives? I think everything was installed with the default initial packages.

Also, is having a fast 10-finger typing a prerequisite to using vim or emacs? I'm I not worthy if I only type with 4 or 6 fingers and 40WPM?

I believe most distros only pre-install vi and not Vim.

Emacs + Vim: Since the only way of interacting with these programs is through the keyboard, it will prove to be benificial for your typing skills. And probably more frustrating in the beginning. I'm not a coder but use Vim for writing, to-do lists, memos, etc. Expect a steep learning curve. I would suggest subscribing to the Vim_user mailing-list for questions and general help.

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




JHVH-1 posted:

I think its common to install vim by default and symlink it to vi. So if you run vi it just runs vim.

quote:

"NOTE: As of Ubuntu 6.10 (Edgy Eft), the default Vim install is a cut-down version called "vim-tiny". In order to get the full version complete with the online help documentation, and many of the advanced functions such as code folding; you will need to install "vim-full"

But I agree, once you've installed it, the symlink is made.

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




Talking of screen, is there any way I can enable monitoring on a per-session-basis? I know I can enable logging with -L or -l, but don't know about anything for monitoring.

Snippet of my screenrc
code:
screen -t omega         0       bash
screen -t newsbeuter    5       newsbeuter
defmonitor on
screen -t mutt          4       mutt
defmonitor off
screen -t cmus          3       cmus
screen -t beta          2       bash
screen -t alpha         1       /bin/screenstart.sh
 
I'm not happy with the solution I came up with, because it seems to wait for my keyboard input or for a certain period of time before the other screens get processed.

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




I have a bunch of static html files with date entries like the following:

code:
<h2 class="date">05.10.2009 21:43</h2>
but I need to swap the month with the day like this:

code:
<h2 class="date">10.05.2009 21:43</h2>
I'm thinking sed, awk or python?

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




falz posted:

Lots of ways. here's perl:

code:
perl -p -i -e 's/05\.10/10\.05/' *.html

Sorry, I meant to say that the date entries differ, <h2 class="date">05.10.2009 21:43</h2> was just an example. Basically it goes all the way back to February, multiple html files for each date. But always written like <h2 class="date">mm.dd.yyyy hh:mm</h2>

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




Lucien posted:

code:
$ sed 's/\([0-9]\{2\}\)\.\([0-9]\{2\}\)\./\2\.\1\./' input.html > output.html

Woah, thanks! Just what I was looking for.

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




Lucien posted:

Cheers. Regular expressions look confusing but are really useful and not at all difficult to write once you get the hang of it. If you need this stuff more often than like once a year, you should definitely look into it.

I know, I know. Do you think it's worth buying that O'Reilly book on regexp or should I just google and print out stuff I find on the web?

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




@Lucien and juggalol

Thanks for the input, I think I'll give both suggestions a try, since learning about sed and awk is high on my list anyway.

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




I think I just messed up my install of Ubuntu.

Because I'm apparently way too curious I decided to compile the latest stable of AbiWord. When I tried to compile it, I noticed that libpango was too old. So I dl'd the latest pango. ./configure told me I need the latest glib so.... I compiled and installed it

Well you can probably guess the state of my system now. gdm freaks out, firefox and about every other gtk-app fails to start with
code:
 (firefox:21633): GLib-GObject-CRITICAL **: g_object_get_qdata: assertion `G_IS_OBJECT (object)' failed 
Time to reinstall or is there still hope for this system? I've tried
code:
make uninstall
in the basedir of my dl'd glib-sources, plus
code:
apt-get --reinstall install ubuntustudio-desktop
, but no luck. I'm going to hide in the corner now.

mike12345 fucked around with this message at May 14, 2009 around 17:43

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




spoon0042 posted:

That probably only installs that one package which I'm guessing doesn't really have any files and only depends on other packages; my guess is you'll want to reinstall libglib2.0-0 (or something like that) and whatever else you think you clobbered.

Yeah, I tried to purge and reinstall libglib2.0, but I can't see any difference. I even compiled the corresponding glib-version myself and installed it, but nothing. Which is weird: Basically the system should have the same glib as before, but apparently it doesn't.

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




Anyone know some ncurses/console-based system monitor that shows me running processes, mem/cpu usage + network statistics? I'm currently using htop and slurm separately, but would like an app that's a combination of both.

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




I'm currently trying to get my Windows clipboard to somehow cooperate with the X Selection of my Debian Guest OS (Virtualbox).

Here's what I added to my .Xdefault

code:
XTerm*VT100.Translations: #override                                         
	Shift<Btn1Down>:	select-start()                               
	Shift<Btn1Motion>:	select-extend()                      
	Shift<Btn1Up>:		select-end(CLIPBOARD)                
	Shift<Btn2Up>:		insert-selection(CLIPBOARD)          
	Shift<Btn3Down>:	start-extend()                               
	Shift<Btn3Motion>:	select-extend()                      
	Shift<BtnUp>:		select-end(CLIPBOARD)  
Thing is, it pastes the Windows clipboard into xterm just fine (middle click), but shift+selecting xterm text doesn't find its way to the Win clipboard. I found the snippet doing a quick google search, but don't know why it works only one way.

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




Is there a way to "reload" the title of an xterm?

I don't know if it's screen or mutt, but I'm currently running irssi and it still says "mutt: mail/local/blabla". FAKEEDIT: Just checked, title stays after I exit mutt, so disregard the irssi bit.

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




I'm looking for someone to write a script for my website, more info @ http://forums.somethingawful.com/sh...hreadid=3398004 (SA Mart).

Basically the scripts needs to crawl folders of static html and randomize links and images. I pay 20 bucks.

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




I'm slowly migrating from Virtualbox guest OS Debian Lenny to Squeeze, but can't seem to find some of the system-wide config files.

In Lenny, I modified Xorg to take my Windows clipboard and pipe it to xselection. So basically stuff I CTRL-C in XP is available via middle-mouse-click in Debian.

I've been looking through /etc/X11 for the last 30 minutes, but can't seem to find it.

EDIT: Mmmkay next time maybe source the imported .bashrc before I start looking elsewhere. Gawd.

mike12345 fucked around with this message at Apr 5, 2011 around 09:39

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




Does Fedora have some kind of dist-upgrade process for upgrading to the next version? (Or maybe it's possible, but not advisable)

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




Oh ok, no problem then. I wasn't sure if I should wait a bit and go with 24, or use 23 now & upgrade. But if there's an implementation that works, guess I can go with 23.

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




Dexpot does all that. On Windows. (it's really cool though and free, if you're on a Win PC, check it out)

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




I have a very old laptop whose CMOS battery has run dry, so now I'm contemplating if there's a way to ignore the BIOS date/time on startup and directly sync it from a server? Replacing is of course an option, but since there's always net access, why not ignore it and get it from the net instead.

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




DeaconBlues posted:

Dunno. Is there a possibility that it might confuse kernel messages and boot up sequence timings before the network is initiated and correct system time and date is retrieved?

yeah that's what I'm wondering

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




Vulture Culture posted:

It's a $2 battery

nah it's a bunch of outdated ones connected in parallel. but I've googled for a single battery with the same voltage/ma, so I'm gonna try that.

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




I have this weird bug with Virtualbox, not sure where to post it. Basically I cloned my Jessie install, and set up xorg. So I reboot, and xdm starts, but my typing is not rendered on screen. Only when I resize the virtualbox window, does it display what I typed. After I login, the same with all the windows and everything. It's only rendered after a resize. I've reinstalled the guest add-ons multiple times, no change.

e: ok a restart seemed to fix it, not sure what happened there.

mike12345 fucked around with this message at Jul 10, 2016 around 08:33

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




I need to keep a local folder in sync with a remote folder, but only have access to ftp. What's the best tool for that?

Adbot
ADBOT LOVES YOU

mike12345
Jul 14, 2008

"Whether the Earth was created in 7 days, or 7 actual eras, I'm not sure we'll ever be able to answer that. It's one of the great mysteries."




mike12345 posted:

I need to keep a local folder in sync with a remote folder, but only have access to ftp. What's the best tool for that?

to elaborate, years ago I used lftp with -mirror, but there are probably more elegant solutions available nowadays.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply
«2 »