Tag-Archive for » bash «

Thursday, November 12th, 2009 | Autore:

If you ever find yourself updating a single application in Arch Linux (a very bad idea, btw) and it upgrades readline you might end up seeing an error along the lines of:
/bin/bash: error while loading shared libraries: libreadline.so.5: cannot open shared object file: No such file or directory
Hopefully you still have a bash prompt open and you haven’t closed them all. If you still can, immediately run the following:
pacman -S bash
else you won’t be able to run bash any more because bash would still be linking to the old version of readline.

Anche, in future, don’t run
pacman -Sy application
(python in my case)
instead, run:
pacman -Syu
which will ensure that all applications are upgraded.

Personally, I think that bash should have had a dependency set saying that it required the old specific version of readline and the same for the new bash, requiring the new version of readline. Regardless, rather play it safe. 😉

Condividere
Venerdì, June 05th, 2009 | Autore:

Well it turns out that the problem is a little more subtle than that. It is only the radice user that does not have syntax highlighting.

You see, vim does have syntax highlighting but vi and vim are different binaries. A shell startup script only aliases vi to vim if the user id is higher than 100 – which excludes root. The simplest workaround is to just add an explicit alias to root’s .bashrc at /root/.bashrc :

alias vi='vim'

run the command manually or just log in again toactivatethe alias.

Btw, I’m starting to like via lot. For a long time it made no sense to mebut now I am found. 🙂

Condividere
Sabato, March 28th, 2009 | Autore:

Its amazing how much you can do by combining the small yet powerful commands Unix has available.

This little-used command, time, finally became useful today as a way to report the length of time that certain automated operations are running. In my example, I’m timing how long it takes to build the Linux kernel:

$ time rebuild-kernel26
...
couple-thousand-lines-of-scrolling-text
...
==> Finished making: kernel26 2.6.28.8-1 x86_64 (Sat Mar 28 17:19:52 SAST 2009)
real    62m21.994s
user    43m31.846s
sys     6m1.096s

Yup, that took a little over an hour to build. The values are:

  • realthe actual time elapsed while the command was running – 62 minutes
  • userthe amount of userland time the command used – 43 minutes
  • systhe amount of system time the command used – 6 minutes

(I was busy doing other things while this was happening which is why it took 62 minutes for the desktop to do (43+6=) 49 minutes-worth of work)

If you’re using the GNU version (most likely), it also gives you the option of displaying the results in a custom fashion. Mostly, this command could be useful in scripts where you need to report how long a task tookor maybe? just a geeky way to time something random. 😛

Condividere
Categoria: linux  | Tag: , , , , , , ,  | Lascia un tuo commento
Mercoledì, 18 Marzo, 2009 | Autore:

[modifica] Così tanto per quello. Si scopre che openssl è in grado di determinare che la chiave e il certificato sono già in un unico file. Pertanto, no csplitting richiesto (bene, Spero che qualcuno leggendo questo almeno imparato a conoscere che bello csplit è). Infatti, l'intero script potrebbe anche essere obsolete… blaargh. Bene, almeno dà un bel avvertimento di non dare una passphrase vuota. 😀

Ecco la nuova versione:

pem2pfx – converte un file. PEM formattato contenente una chiave privata e il certificato firmato in un file di certificato compatibile con Windows. pfx.

#!/bin/bash
#pem2pfx
#v0.2
#Difficile - brendan@swiftspirit.co.za
# Converte un file di certificato. Pem al formato. Pfx
# $1 è il file di origine
set -e
 
se [ $# = 1 ]; allora
  outputfile=`echo $1 | ma 'S / .pem $ /. Pfx /'`
 
  echo "Si prega di specificare una password di sotto. Di Windows si rifiuta di importare un certificato PFX. Con una password vuota."
  openssl pkcs12 -esportazione -fuori $outputfile -in $1
 
 altro
  echo "Pem2pfx - converte un. PEM formattato chiave privata e file di certificato in un file PFX compatibile con IIS.."
  echo "Utilizzo: pem2pfx inputfile.pem"
essere

di più…

Condividere
Sabato, 21 Febbraio, 2009 | Autore:

and my Personal Rating (PR) out of 10 😉

I use Firefox so most of these won’t apply to non-FF users. Tuttavia, I’d be very very interested to hear what other addons my friends, subscribers, and random websurfers find interesting or useful to them. Have your say and let us know why you love the addons you love. 🙂

Personally, I prefer addons that aren’t intrusive. Ideally, an addon must have a minimal interface and give me a measurable benefit for me to keep it installed.

Cacheviewer – 7

This is a GUI front-end for the Cache Firefox keeps of the last few pages and media. I’ve found this addon more interesting than useful right now so I’m probably going to remove it soon.

ColorfulTabs – 9

I love the colours. The tab colour-grouping doesn’t work very well when you reach about 30 tabs though… :-/

Download Statusbar – 10

I prefer having everything in Firefox in a single window in tabs. Having a download box in a separate window is a big no-no for me. It also saves screen real-estate since it is very minimal. 🙂

Video DownloadHelper – 10

Video DownloadHelper sembra per lo streaming media – specificamente alla ricerca di qualsiasi contenuto di grandi dimensioni che viene scaricato. Quando si fa clic sull'icona, vi mostra i flussi attualmente scaricano e ti dà la possibilità di fare la coda come un “normale” scaricare.

Dal momento che non si sa mai se FF sta per mandare in crash o il potere sta per tagliare, Preferirei di salvare una copia al mio desktop e posso quindi visualizzare il video senza l'utilizzo di maggiore larghezza di banda per scaricare nuovamente il video. Anche, al lavoro, quando le persone inviano mi link su YouTube o altri mezzi di comunicazione, Io di solito non si preoccupano a guardare fino a molto dopo – al mio tempo libero o durante una pausa.

Expiry Canary – 9

This neat and minimal addon tells you if the SSL certificate for the site you’re currently viewing is soon going to expire. Se il tuo sito ha un certificato SSL, Vi consiglio di usare questo addon per contribuire ad evitare certificato SSL del tuo sito in scadenza a causa di una semplice mancanza di comunicazione, o comunicazione errata.

Fasterfox – 8

Fasterfox adds some network optmisation options. Some of the options could make your corporate network admin a little mad with you though. 😉

Firebug – 9

Per lo sviluppo web e la sperimentazione con pagine. Impressionante per testare piccoli pezzi di codice e il debug di pagine.

FoxClocks – 6

errtells you the time in other time zones. o.O Was useful for a short timenow its redundant since my head is working it out faster than I can glance. rm -f

FoxyProxy – 9

Impressionante per la navigazione pagine specifiche attraverso i server proxy specifici. This is useful for when some sites are blocked or the SAIX Transparent Proxy servers aren’t working properly. 🙂

Io lo uso per via una parte del traffico su server proxy che preferirei non passare attraverso percorsi predefiniti. Its also very flexible. Se si dispone di più di un server proxy disponibili e il quello usato abitualmente improvvisamente va in un batter, solo passare a quello successivo. 🙂

greasemonkey – 10

Right now, I use this only for the GooglemonkeyR copione. This script reformats Google‘s search results to your specifications and also has an option to show small thumbnail of the pages Google links to. Greasemonkey can do a lot more and there are plenty of scripts readily available for many many sites.

Live HTTP headers – 8

I’ve used this a few times to diagnose gzip compression issues with IIS web servers. Not much else to say though: It works.

Live PageRank – 10 (so faronly installed it yesterday)

This addon seems simple enough. It gets the PageRank from Google and shows it in the tray.

NoScript – 10

NoScript è impressionante a annunci di blocco. Il suo un po 'irritante in un primo momento, poiché è necessario whitelist tutti i siti che ti piace – but in the long run it is soooo worth it. 🙂

resuscitare Pagine – 10

Molto utile per se si passa a un sito e capita di essere giù. Se il sito è statico-content-oriented, allora questo lo rende facile trovare rapidamente il contenuto se il suo memorizzati nella cache on-line.

Tab Mix Plus – 8

Awesome for if you have more than 7-or-so tabs.

ShowIP (using a version modified for work purposesdisplays company server’s canonical name when browsing) – 10

I cannot imagine the hell I’d have to go through to identify a server without this plugin. Okay, I can. Used to have to do this all the time. I eventually scripted it but I can’t find the original script. Here’s my 60-second attempt at recreating what was in that script:

$ cat /etc/hosts | grep `dig A $hostname @mycachingnameserver | presa . | grep -v "^;"`
$ dig -x `dig A $hostname @mycachingnameserver | grep ^$hostname | grep A | \
  awk '/[.]/{print $5}'` @mycachingnameserver | presa . | grep -v "^;"

Web Developer – 9

I used this once to diagnose some issues with a page. I don’t do much web development so I’m going to remove this one. Its no comment on its capabilities since I believe this is a top notch add-on se you’re doing a lot of web development work.

Condividere