Re: Problem with time command
Boyd Stephen Smith Jr. wrote: GNU time 1.7 bss@dellbuntu:~$ type time time is a shell keyword (Bash has a time builtin that you should avoid if you want to use the time binary.) Actually it's a keyword not a builtin. By contrast, kill: chrisj@alice$ type kill kill is a shell builtin This also means you can't disable it: chrisj@alice$ enable -n time bash: enable: time: not a shell builtin Not sure why time is a keyword (on a par with if, for etc.) rather than a builtin, but there you go. If anyone has any enlightenment, I'd be curious ;) -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4d9c342a.1090...@shadowcat.co.uk
Re: Problem with time command
Boyd Stephen Smith Jr. wrote: In 4d9c342a.1090...@shadowcat.co.uk, Chris Jackson wrote: Boyd Stephen Smith Jr. wrote: GNU time 1.7 bss@dellbuntu:~$ type time time is a shell keyword (Bash has a time builtin that you should avoid if you want to use the time binary.) Actually it's a keyword not a builtin. That's why I used quotes. For most purposes it can be treated like a shell builtin, but it's not really one. Shell keywords are part of it's parser syntax, ... Yeah, I knew that ;) - I was wondering why. Given it's only recognised at the start of the pipeline gives the clue I needed - it's so it can time the whole pipeline rather than just a single command: root@alice# time time dd if=/dev/urandom bs=1024 count=1024 | time gzip -c -9 /dev/null 1024+0 records in 1024+0 records out 1048576 bytes (1.0 MB) copied, 0.77579 s, 1.4 MB/s 0.00user 0.48system 0:00.77elapsed 62%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+248minor)pagefaults 0swaps 0.18user 0.00system 0:00.78elapsed 23%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (0major+218minor)pagefaults 0swaps real0m0.785s user0m0.184s sys 0m0.500s Curiosity satisfied - thanks! -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4d9c6f5a.5040...@shadowcat.co.uk
Re: [OT] English language [was:Re: OpenOffice.org - how to install additional languages?]
Not sure I want to get into this ;) - but ... Ron Johnson wrote: On 04/03/2011 02:54 PM, David Jardine wrote: On Sun, Apr 03, 2011 at 03:08:55PM -0400, Doug wrote: has the force and power of law. It is _illegal_ to name anything public in English. If you have a store and call it by an English name you will be forced to change it to something French. The only exception I have heard of is Le Drugstore. I don't know how they get away with it. What populist propaganda have you been reading? How do they say Disneyland in French? Terre de Disney? Terre de Souris? A glance here reveals several restaurants in Paris that seem to be willing to break the law in that case: http://www.placesinfrance.com/restaurants_in_paris_france.html If English, either British or American, had such an academy, we would still be speaking the language of Henry VIII! And we would never have had the opportunity to get rid of the French spelling of things like centre. ... or table ? Come on! A nationalistic dictionary compiler (anti- British Webster completed his /American Dictionary/ while at U. Cambridge. Would an anti-Brit really go to England to do his work? Interestingly, Samuel Johnson's admiration for the French Academy was what inspired him to write his dictionary, and it seems it was in part due to this admiration he chose the French-style spellings. Center etc. was more common before that. No political points, just observations ;) -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4d98dc61.6020...@shadowcat.co.uk
Re: Command line: How do you keep the output from scrolling out of sight?
Jason Hsu wrote: I'm using Debian in a command-line-only installation for running a firewall/server. I know that I'm supposed to use the messages I see every time I enter a command for troubleshooting purposes. But if the output is too long, then the first messages scroll out of sight, and that makes it impossible to properly troubleshoot when I don't know what I'm doing. Is there a way to get the output to temporarily stop so I can read it all if I wish? On most terminals: CTRL-S will stop output CTRL-Q will restart it Note that if it runs out of buffer space the process will stop, blocking on output. Also, possibly useful, SHIFT-PgUp may scroll back half a page (but it drops back to the bottom when there's new output) Other useful things may be to pipe the output through less (which presents it one page at a time) or tee (which will save it to a file, and you can look through the file from another termianal while output continues on the main one). Check out the man pages for those two things if they seem useful. If you're not sure about piping things to other things, you need to read up on how to use the command line. This site seems as good as any, but a web search will provide many others: http://linuxcommand.org/ -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4d6d2b63.70...@shadowcat.co.uk
Re: File systems' timestamps apparently formatted in a wrong way ...
Albretch Mueller wrote: ~ ... or ls not properly displaying them in some cases. ~ I got this compressed file that seems to be the metadata snapshot of a file system you get by running: ~ ls -lR ~ but not all timestamps are formatted the same. You get them as, say, Mar 24 2004, but also as Dec 26 09:55 (without the year!) and they are (or seem to be) files in the same directory ~ Why would that be? Under the C or POSIX locale, timestamps which are near to now are shown with the time and without the year; those well removed show the year, but not the time. I'm not sure of exactly how far into the future or past the cutoff point is. This is generally useful to human readers but a pain for automated parsing. With GNU ls, you can pass --full-time or --time-style=various options (see the ls man page for details); alternatively stat can be useful. Other locales may vary. -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4d20774d.4000...@shadowcat.co.uk
Re: bash increment in a given way
S Mathias wrote: $ MAGIC; do echo Welcome $i times; done Welcome 0 times Welcome 1 times Welcome 4 times Welcome 5 times Welcome 8 times Welcome 9 times $ thanks:\ for i in 0 1 4 5 8 9; do elcome $i times; done -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4d039b75.1040...@shadowcat.co.uk
Re: An experiment about file timestamp
Rodolfo Medina wrote: Chris Jackson c.jack...@shadowcat.co.uk writes: File timestamps are (or at least should be) stored in UTC. It's the display of them that's affected. But I did the following experiment: on a computer with system time set to UTC, I created a file at 14:43 UTC. Then I copied it via rsync and ethernet cross cable to another PC with system time set to GMT, one hour late respect to UTC. I expected that, on the 2nd PC, the timestamp was displayed in the local time, i.e. 15:43; instead, it appears as 14:43 as well. (For the copy I used the -t option.) So, according with this experiment it is not true that the displayed time is in local format. I think this may cause serious errors: in fact, when someone read the timestamp on the 2nd PC, he would believe that the file were created at 14:43 of the GMT time, which is wrong: in fact, it was created at 15:43 GMT = 14:43 UTC. What do you all think? Rodolfo GMT, as far as a computer is concerned, is the same as UTC. The difference is that GMT is a solar time and may be up to a second different, however since computers don't make solar observations, they're the same in implementation, and many people use them loosely to mean the same thing. http://en.wikipedia.org/wiki/Coordinated_Universal_Time Paragraph 4 of the introduction, plus discussion under History. Are you thinking of British Summer Time, a form of daylight saving time, which ended last weekend anyway so the UK is now on GMT? The question about FAT filesystems is a different one as Camaleon observes, however. I misunderstood in my original mail. -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4cd2f504.3010...@shadowcat.co.uk
Re: what is the use of -c parameter of column(1), can you demonstrate with an example?
Zhang Weiwu wrote: from man column(1) -c Output is formatted for a display columns wide. Try: almust...@orphalese:~$ echo aaa bbb | column -c 20 expected result (17 spaces): aaabbb actual result: almust...@orphalese:~$ echo aaa bbb | column -c 20 aaa bbb Confusing. Or do I misunderstand the purpose of column(1)? Thanks. -c is for the total number of columns. Having said that, I can't get it to actually do anything, so I could be wrong. You could perhaps use awk: http://unstableme.blogspot.com/2008/12/awk-formatting-fields-into-columns.html (bit fugly) or, depending on exactly what you need, look at pr(1). -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4ccffd8e.3050...@shadowcat.co.uk
Re: Timestamps jump by one hour when switching timezone
Rodolfo Medina wrote: Hallo. Last sunday, in my time zone (Rome), clocks were got back by one hour. I noticed that my Debian Lenny had done so automatically, but files timestamps were also took back by one hour, which is not what we want. File timestamps are (or at least should be) stored in UTC. It's the display of them that's affected. Setting the TZ variable may help: export TZ=UTC Timestamps stored _in_ files (for example log files) are taken from system time, that stored in /etc/localtime. You might want to set that to UTC and, where required, alter the displayed time using the TZ variable, rather than running system time on something with DST, since it can cause problems with timestamps within log files etc. being duplicated around the time of the change. cp /usr/share/zoneinfo/UTC /etc/localtime Or, you may wish to use a nearer-local non-DST timestamp: cp /usr/share/zoneinfo/Etc/GMT-1 /etc/localtime Personally I find using UTC/GMT on all our systems, wherever based, as system time the simplest, and managing the displayed time using TZ as applicable. It means to read log files you need to convert, but at least it's in only one direction, wherever you are. -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4cd008b0.4080...@shadowcat.co.uk
Re: [OT] Re: Toner refill
Stan Hoeppner wrote: ... This tactic is expected of left wing political hacks on sites like salon.com or moveon.org, but on debian user? I thought we deal in technical facts here. ... Should we take a poll? Is Ron Johnson A. A 50 something 'ish IT veteran as he claims B. A 20 something tech geek living in mom's basement :) Pot, this is Kettle. Kettle, meet Pot. Don't make me come back there, you two! :) -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4ccaa160.2060...@shadowcat.co.uk
Re: escape .c files to html code with bash how?
Jozsef Vadkan wrote: i need to encode .c files to html, like on this website: http://centricle.com/tools/html-entities/ i tried to write a bash script for it: http://pastebin.com/raw.php?i=mZKAw4c5 but it's not working very well :D does anyone has a script, that does this? thank you :\ http://www.listware.net/201007/fedora-users/7260-text-to-html.html It looked like homework when you posted it on fedora-users, and it still looks like homework now... Besides, if you can even read a man page and try a few experiments I can't see how you've been making any serious attempt at this and still haven't figured it out since July; it's very simple... -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4cbc2799.9050...@shadowcat.co.uk
Re: a data rate threshold tool?
Zhang Weiwu wrote: Hello. I found my application, which was supposed to run 10 hours, either run and starve every other service on it, or doesn't run at all. Even with nice and ionice, I cannot avoid other web services starved by this application. And it has to run on the production server. One trick that comes to my mind is to use a data rate threshold tool to limit the data rate input is fed to the application. $ threshold --rate 20KB/s data_source | my_greedy_application Is there such a tool in Debian? I don't know about a tool, but assuming it's not important that the rate is precise as long as it's somewhere about right, a simple perl script will do it. You can probably do similar things with python etc. The following takes a rate in bytes a second and optionally a block size in bytes, and writes a block of data at the appropriate interval (no --rate - so if you save it as threshold invoke it as threshold 20480 - for 20kB/s). Default block size is 1k. Note that I only just wrote it, so YMMV and take it as an example for experimentation ;) Should be fairly obvious how it works; note it'll do silly things if you give it silly arguments, in particular very large block sizes. -- start of script #!/usr/bin/perl use strict; use warnings; use Time::HiRes qw(sleep); my $rate=$ARGV[0]; if(!$rate) { print STDERR No rate given\n; exit 1; } my $block_sz=$ARGV[1]; $block_sz=1024 unless $block_sz; my $delay=$block_sz/$rate; my $bytes; my $nbytes; while($nbytes=sysread STDIN, $bytes, $block_sz) { while($nbytes) { my $wbytes=syswrite STDOUT, $bytes, $nbytes; if(!defined($wbytes)) { print STDERR error writing: $!\n; exit 1; } $nbytes-=$wbytes; } sleep($delay); } if(!defined($nbytes)) { print STDERR error reading: $!\n; exit 1; } exit 0; -- end of script -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4cb066fc.30...@shadowcat.co.uk
Re: su?
Doug wrote: Tried to run a program from command line needing admin capability. Input su /usr/sbin/synaptic Get message Unknown id: /usr/sbin/synaptic Logged in as root, put in password, ran /usr/sbin/synaptic and the file ran fine. Is there no su in Debian? If not what replaces it? /bin/su is in the login package. If you want to supply a command to it, rather than run a shell, you need su -c command su something tries to change to user something and run a shell (man su for details). -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4c8beb08.9060...@shadowcat.co.uk
Re: Ethernet connection
Camaleón wrote: On Fri, 03 Sep 2010 13:34:40 +0200, Rodolfo Medina wrote: Camaleón writes: You can run /sbin/ifconfig in the old desktop PC to find out the IP address in use. From the old desktop: # ifconfig eth0 Link encap:Ethernet HWaddr 00:19:cb:d7:b6:c5 inet addr:127.0.0.1 Bcast:127.255.255.255 Mask:255.0.0.0 O.k. so your old desktop is not getting any IP (127.0.0.1 is the loopback address). [...] And is also on the lo interface where it should be. Not quite sure how you've managed that, but I might be minded to double check that /etc/network/interfaces file (on old desktop). Everything has an lo interface on 127.0.0.1, that's correct; it's not the main address and is inaccessible from outside the host itself. It's called the loopback and is used for where you need to make an ip connection, but fold it back onto a server program running locally (you can do this with an external address too, but lo is there for if you're not running one, or it's not up at the moment, etc.). eth interfaces shouldn't have this address. -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4c80ecdc.20...@shadowcat.co.uk
Re: 2 packages with the same file
spam.spam.spam.s...@free.fr wrote: (sorry for the french messages, I don't want to change my locale but if you consider it is very important to see the messages in english I can do it) It'd probably help. You don't have to (well, shouldn't have to) permanantly change your locale to do it, just: export LC_ALL=en_US.UTF-8 do your stuff, and unset LC_ALL to go back to French. -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4c6151c6.7070...@shadowcat.co.uk
Re: iceweasel doesn't open research.microsoft.com
Thierry Chatelet wrote: On Tuesday 29 June 2010 15:02:15 sasha mal wrote: Package: iceweasel Version: 3.0.6-3 The bug exists, the iceweasel package maintainer is lazy and refuses to handle it. Summary: Iceweasel cannot open research.microsoft.com as well as many pages on the site when cookies are enabled. For example, trying to open http://research.microsoft.com/en-us/people/thoare/ Opens ok here, squeeze Iceweasel/3.5.9 It's fine from here too, lenny iceweasel 3.0.6-3 -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4c2a01a9.1090...@shadowcat.co.uk
Re: usage of ifconfig
J.Hwan.Kim wrote: Hi, everyone When I change IP address and netmask via ifconfig, the netmask is set incorrectly. For example, when I command in shell ifconfig netmask 255.255.255.0 70.7.44.102, the IP address 70.7.44.102 is set correctly, but the netmask is set to 255.0.0.0. That's the classful netmask for 70.x.x.x. I've never seen ifconfig used without an interface specified before (other than to print current settings), but a quick experiment indicates the netmask needs to go after the ip address: ifconfig eth0 70.7.4.102 netmask 255.255.255.0 -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4c18ccbf.7020...@shadowcat.co.uk
Re: tricky perl question - ascending order
Jozsi Vadkan wrote: or maybe in bash.. script/one liner e.g.: input: http://pastebin.com/raw.php?i=pMZPEsMZ i want to make this output from it: http://pastebin.com/raw.php?i=kH8VxT0A So from the input, i want to make an ascendant order, how many things are under a SOMETHING-XX Does anyone has any perl magic in the pocket, how to do this? :D Thank you very, very much..:\ Assuming you can rely on the positions of the blank lines, this seems to work. Should be easy to change if you want to rely on SOMETHING being at the beginning. perl -e '$f=1; while() { chomp; if ($_ eq ) { $f=1 } else { if ($f) { $x{$_}=[]; $k=$_; $f=0 } else { push @{$x{$k}}, $_ } } } for(sort keys %x) { print $_, \n, join(\n, @{$x{$_}}), \n\n }' There's probably a perl hacker or two who can do it neater, but as I say, it seems to work ;) -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4bf95e41.4020...@shadowcat.co.uk
Re: Put date on log file names?
vr wrote: Due to message volume, I'm considering rotating my mail logs daily at my local time midnight and retaining about 30 days worth of files on disk. I'd like to have the date in the file names so visually I'll know what span is in each file. Can this be done? (put dates into the file name) You need the dateext option in the logrotate config. That'll mean your archives have the date extension, and the current one is just whatever it's normally called, which I guess should be OK for you? Should this be done? (put the date into the file name) Never caused me any problems ;) -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4bf1874f.60...@shadowcat.co.uk
Re: Odd logcheck behaviour.
Friedrich Clausen wrote: Hi All, I am trying to filter out Java stack traces from a log file and thereby only send the initial exception so as to make the emails smaller. In my manual tests this works (stack traces are not in emails) but when running from cron the exceptions are not filtered out (stack traces are present in logcheck emails). When I test manually, I do the following - $ cat sample.txt|sed -e 's/[space]*$//' | egrep -v -f ./gigaspaces I suspect it's because you're using a relative path (./gigaspaces). You'll need the full path to it from cron which may not be in the same directory you were in. -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4bd854dd.1080...@shadowcat.co.uk
Re: how to remove postgresql package that don't want to be ?
Frank Bonnet wrote: Hello I'm trying to remove the postgresql package without success ... any info welcome [snip] h1n1:~# dpkg -l | grep postgres pi postgresql-8.3 8.3.9-0lenny1 object-relational SQL database, version 8.3 server ii postgresql-client-8.3 8.3.9-0lenny1 front-end programs for PostgreSQL 8.3 ii postgresql-client-common94lenny1 manager for multiple PostgreSQL client versions ii postgresql-common 94lenny1 PostgreSQL database-cluster manager The package name is postgresql-8.3, you need to remove it by that name, not just postgresql. You may need to remove the client/common files separately. -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4ba35016.1030...@shadowcat.co.uk
Re: bash scripting question
Mike McClain wrote: I've written a function to print elapsed time similar to /usr/bin/time but can be called at the beginning and end of a script from within the script. Occasionally I get an error: '8-08: value too great for base' It's caused by the difference in these 2 command strings but I can't for the life of me see what's going on. now='09:07:16'; startHr=${now%%:*}; startHR=${startHr#*0}; echo $startHr; 09 str=09; str=${str#*0}; echo $str; 9 Did you mean to echo $startHR - capital 'R' - in the first one? That is '9' as you are expecting ;) -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4ba3bb55.50...@shadowcat.co.uk
Re: bash scripting question
Paul E Condon wrote: Try: bgn=$(date +%s) sleep 7 end=$(date +%s) echo elapsed seconds = $(( end - bgn )) You might also want to experiment with: ps h -o etime $$ as long as you're happy with it only running under gnu. Prints the elapsed time for the shell. -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4ba3dae2.7080...@shadowcat.co.uk
Re: Kernel headers for 2.6.32-trunk-686?
Jen wrote: Hi, My name is Jen, and I'm new to the list. I've been playing with Linux on and off for about a year, but have only recently found a distro that meets my accessibility needs (Debian unstable). It's also a great learning tool :P I need to build some packages from source, and I need kernel headers to do it. I can't find the headers I need, when I try to install them in the conventional way I get the error 'package not found'. An 'apt-cache search' finds nothing. Can someone please tell me where to get the kernel headers for 2.6.32-trunk-686, and how I install them? The linux headers are in /usr/include/linux, so: apt-file search /usr/include/linux (you might need to install apt-file) - and that reveals they're in linux-libc-dev. You might want to think about installing build-essential, which pulls in the headers and a number of other useful things for building source packages. -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4ba3f43e.60...@shadowcat.co.uk
Re: why does resolv.conf change?
Clive McBarton wrote: My /etc/resolv.conf gets overwritten periodically. Any ideas why? I thought network-manager was the culprit and deinstaled it, but the problem persists. dhcpd can do it. -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4ba24d06.7030...@shadowcat.co.uk
Re: Clearing Screen on Logout?
Carlos Williams wrote: I think having to type 'clear' before log out is crazy. Also if I have 1,000 users, thats a log of files to edit. Is there no global file config that will achieve this? /etc/bash.logout -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4b8d542d.6010...@shadowcat.co.uk
group vector not updating
After using vigr and vigr -s to change the group and gshadow files, I then log in as the user who's been added to a new group, and run groups - and it's not there. If I then do usermod -a -G this makes no change to the group/gshadow files, but now when I log in as the user, the group is there. Anyone any idea as to what causes that - and what to do about it? Thanks. -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4b8c27bd.1060...@shadowcat.co.uk
Re: Bash question: get output as a variable?
Dotan Cohen wrote: I'm scripting a backup solution, the line that does the business looks like this: tar -zcvf - * --exclude-from $EXCLUDES | openssl des3 -salt -k $1 | dd of=$(hostname)-$(date +%Y%m%d).tbz Because of the v flag tar writes to stdout the name of each file copied. How can I get that output redirected to a variable, to use later in the script? Thanks! Use $() like you do with the date command. You have to redirect stderr back to stdout, which means running it in a subshell: FILES=$( ( tar -zcvf - * --exclude-from $EXCLUDES | openssl des3 -salt -k $1 | dd of=$(hostname)-$(date +%Y%m%d).tbz ) 21 ) It may cause unexpected results if there're spaces in the filenames though. -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: Decode unixtime
T o n g wrote: Hi, Which tool can help me decode the Unix time? E.g., strings like 1257624539, 1258162046, 1257623988, 1257709563, etc. they are about 68 days ago. Thanks It's not well documented, but: date -d, with an '@' before it: chr...@hercule$ date -d '@1257624539' Sat Nov 7 20:08:59 GMT 2009 -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: Two computers in one: two users each with their own accounts, monitor, and keyboard?
Dotan Cohen wrote: 2010/1/6 Boyd Stephen Smith Jr. b...@iguanasuicide.net: From what I understand about Linux in general, no. At the very least, doing so your be overly complicated. ... Thanks, Boyd, that was actually ver informative. As there is no room for a second tower, I will see about modding the existing tower for two motherboards. There actually is room, only the CPU cooling tubes might be problematic. Oh, and I'm going to have to see if a single 500W power supply with another pigtail soldered will power both! That should probably be the weak point in the system! I actually think this just might be possible, although I'm by no means sure. I've got as far as running an X session on a separate video card in the past, for display purposes only (that is, we ran for example `DISPLAY=0:1 mplayer' to use the alternate display). I experimented briefly with trying to get an actual xdm session on there, and while I could get it to start, the problem was in picking up which device which keyboard/mouse was attached to. I'm curious about whether this is possible with udev, since that was in the days before it - I think it may - possibly - be, and might have some time to experiment this weekend if you're still interested. -- Chris Jackson Shadowat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: USB disk shows up late at boot
Paul Cartwright wrote: On Mon December 21 2009, Celejar wrote: 2) From the appropriate directory, run make menuconfig (or xconfig or whatever you prefer) and configure appropriately I think I have done this before, I think I tried it for a 64bit kernel, for my Duo-Core processor, but it didn't turn out well. Seems to me the configure' part takes 2 days, or way too many options. I seem to remember it asked whether i wanted support for every known piece of hardware out there, and I don't know when to say Y or N.. I think you may have done make config rather than make menuconfig. Menuconfig - at least should - provide a menu-based interface you can select packages from. It can still take a while, but much faster than being asked for each one which is... somewhat unwieldy these days. Similarly, make xconfig provides an X-windows interface; I've never used this. One way of getting a list of modules you might need is to start with a stock kernel based on using modules, perhaps from a live CD. Start anything you want up, then do lsmod which will get you a list of all the modules it's loaded. Mapping between the module name and the exact option needed is not always as easy as it might be, but we'll call that learning experience ;) Apart from that, you have to anticipate: for example if you think you might need USB printing, but don't have one right now, perhaps include it. -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: regexp: anything but |
lee wrote: Hi, I'm looking for a regular expression that matches anything but the pipe sign ('|'). To match anything except |, use: [^|] -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: regexp: anything but |
lee wrote: On Wed, Dec 09, 2009 at 06:07:34PM +, Chris Jackson wrote: To match anything except |, use: [^|] Thanks! That's nice, but the pattern '\^.*\|[^\|]-[0-9]\|' still matches all lines ... and I don't see why/how it could to that ... Hmm. Here's an example line: TV|VOX-1|167(2)|136(ger),|71|12060|1089|SAstra-1H|12187|27500|h|34|-1|-1|-1|-1|-1|-1|-1|2120|||1| start of line anything pipe anything but pipe -[-0] pipe should match above line. But why does it match TV|VOX|167(2)|136(ger),|71|12060|1089|SAstra-19.2E|12187|27500|h|34|-1|-1|-1|-1|-1|-1|-1|473|||1| If you're in sed: '/^[^|]*|[^|]*-[0-9]|/' If you aren't using extended regular expressions (sed -r), pipe is not special. Also don't escape ^ ;) Note that from the shell this is in single quote marks to stop shell expansions. Doing it without those would be masochism ;) -- Chris Jackson -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: regexp: anything but |
lee wrote: On Wed, Dec 09, 2009 at 07:07:52PM +, Chris Jackson wrote: Note that from the shell this is in single quote marks to stop shell expansions. Doing it without those would be masochism ;) It already is: l...@yun:~/tmp/chan$ cat channels.dvb | sed '/^[^|]*|[^|]*-[0-9]|/' | wc -l sed: -e Ausdruck #1, Zeichen 21: Fehlender Befehl 0 l...@yun:~/tmp/chan$ (which means: expression #1, character 21: missing command --- and it matches every line) But the idea behind your version is interesting :) Well, you need to give it a command, I just gave you the regex. And the default in sed is to print every line. Try: sed -n '/^[^|]*|[^|]*-[0-9]|/ p' Where -n means don't print every line (technically it prints the pattern space at the end of processing each line), and p is the command meaning print - i. e. print those that match. -- Chris Jackson -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: Which package provides /etc/init.d/inetd ?
Mathieu Malaterre wrote: When I execute, this search non of them is actually *exactly* /etc/init.d/inetd. So no I do not think this was so trivial. Looks to me like Debian doesn't have that specific file, as far as I can make out. It does have a pretty well standard /usr/sbin/inetd in the package inetutils-inetd, which is started in turn by /etc/init.d/inetutils-inetd. If it's important to be called that, for a script or the like, you could symlink it perhaps? -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: Which package provides /etc/init.d/inetd ?
Chris Jackson wrote: Looks to me like Debian doesn't have that specific file, as far as I can make out. It does have a pretty well standard /usr/sbin/inetd in the package inetutils-inetd, which is started in turn by /etc/init.d/inetutils-inetd. If it's important to be called that, for a script or the like, you could symlink it perhaps? Forgive me, it's openbsd-inetd that provides /usr/sbin/inetd, but the principle is the same. -- Chris Jackson Shadowcat Sysatems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: Iceweasel annoyance
Anthony Campbell wrote: On 21 Nov 2009, John Jason Jordan wrote: I am on a web page and there is a link for Contact Us. I know little of html, but I think the code behind the link is mailto. If I click on it a window pops up on the desktop inviting me to configure Evolution. Well, Evolution is not configured and never will be configured. I use Sylpheed for my mail reader. I am very happy with Sylpheed and have no intention of changing. [snip] I've tried various ways of getting this to work over the years but now I just take the simple way out. I right-click on the mail-to link. This produces a little window with the email address in it. I copy this into Mutt and carry on from there. Not very elegant but it works. If you go to Edit - Preferences, go to the Applications section, and add or change the entry for content type mailto, you can use a different mailer. -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: BonziBuddy
Bonzi Buddy wrote: ok so my friend found it but he says it doesnt work on windows 7 how do i recode it to work on windows 7 also what is a debian is that a special pc brand cuz my friend said these are pc windows support forums k thx bai Debian is, in a rough summary, a form of unix, hence not Windows in any way means or form, You may have better luck on perhaps a Windows mailing list. Have fun. -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: BonziBuddy
Bonzi Buddy wrote: hi my friend wants me to install bonzibuddy 4 him but i cannot find it where can i get ithow should i install plz help this is a emergency k thx bai It only works on Microsoft systems so you can't install it on Debian; I doubt it would work under WINE even. They also went out of business four years or so ago, so it's not supported. Not to mention the fact it is horrible and reputed to be spyware... However, if your friend has a Windows system and really wants to do this, just search for it. HTH HAND. -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: question about timezone
Guillaume CHARDIN wrote: Hi, I actually run a debian etch on my computer. I just run `date` on this computer and i don't understand what is displayed. I live in France and the timezone is (as my knowledge) gmt/utc +01:00. When i run `date `on my computer it shows me : Sat, 03 Oct 2009 19:22:56 +0200 UTC +0200 ?! whats wrong ? I look into /etc/timezone and the timezone is set on Europe/paris. The file /etc/timezone is the same as /usr/share/zone/Europe/Paris... You're currently in daylight saving time. Britain is on GMT+0100, most od Western Europe on GMT+0200. -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: dev/null only root access - why?
Nelson Castillo wrote: On Tue, Sep 22, 2009 at 2:23 PM, Emanoil Kotsev delop...@yahoo.com wrote: Why does dev/null has rw permissions only for root? ls -al /dev/null -rw-r--r-- 1 root root 0 22 сеп 21,09 /dev/null Mmm. Weird major and minor numbers. It doesn't look like a char device. It's a regular file of size zero created at 2109 on the 22nd of what looks like cen - which is sep in cyrillic. Whoever made the comment about something creating the file before the device gets created is right I rather suspect ;) Or udev isn't running for some reason. -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: dev/null only root access - why?
Chris Jackson wrote: Or udev isn't running for some reason. I correct myself, /dev/null exists, at least on my system (lenny), on the underlying /dev with the minimal set of devices on there. So it should never not exist as far as I can see. Did you do anything that might have deleted it, or are you in some odd situation such as a chroot where it's not created, perhaps? -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: df/du shows big difference of used space
Mike Castle wrote: On Wed, Sep 9, 2009 at 9:56 AM, niclaswniclaswm...@gmail.com wrote: I have a 1500G hard drive, encrypted. ... Traditionally, 5% of every file system is reserved for root to do with as it pleases. ... Additionally, depending on what filesystem you're using, you may have a journal on there. If you're using ext3, dumpe2fs device will tell you how big that is. -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: how to set up iceweasel 3.5 to use mutt as mailer for link sendto
Elimar Riesebieter wrote: I've tried settings - apps - mailto - shellscript Shellscript: #!/bin/sh exec xterm -e mutt $@ I'm guessing mutt can't parse the mailto: line given out by iceweasel. Here's a very quick and very dirty bit of perl I knocked up; I'm not suggesting it's right, but it'll hopefully give you a starting point: #!/usr/bin/perl sub escape { $result=$_[0]; $result=~s{([\$])}{\\$1}g; return \$result\; } ($dummy, $params)=split /:/, $ARGV[0], 2; ($address, $params)=split /\?/, $params, 2; print $params\n; for $x(split //, $params) { ($key, $val)=split /=/, $x, 2; print $key: $val\n; $paramhash{$key}=$val; } $cmd=mutt; $cmd.= -s .escape($paramhash{subject}) if($paramhash{subject}); $cmd.= -c .escape($paramhash{cc}) if($paramhash{cc}); $cmd.= -b .escape($paramhash{bcc}) if($paramhash{bcc}); $cmd.= $address; print $cmd\n; exec $cmd; -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: chown question
Douglas A. Tutty wrote: I know that I could have used find to look for all files owned by the old UID, plunked it through xargs and chowned them that way, but is there a way, as root, to chown directly the hidden files without chowning the whole box? The simplest way would be to recursively chown the home directory: chown chrisj.chrisj ~chrisj That won't follow the .. link. -- Chris Jackson -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Re: chown question
Chris Burkhardt wrote: chown chrisj.chrisj ~chrisj That won't follow the .. link. Shouldn't that include the recursive flag? chown -R chrisj.chrisj ~chrisj Apologies, yes it should. -- Chris Jackson Shadowcat Systems Ltd. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org