Re: A puzzle with internet time and NIST time

2012-10-15 Thread Ivan Shmakov
 Paul E Condon pecon...@mesanetworks.net writes:
 On 20121015_214840, John Hasler wrote:
 Paul E Condon writes:

  Ideas?

  Run cronyc and post the results of the tracking and sources
  commands.

  Now I am running NTP.  Is there something I could post from NTP that
  would be useful?

$ ntpq -pn 

  The switch will take some time, and I'd rather not do it now.

-- 
FSF associate member #7257


-- 
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/86y5j7dp3b@gray.siamics.net



Re: PulseAudio sound issues

2012-10-11 Thread Ivan Shmakov
 Alejandro Santos lis...@alejolp.com writes:

[…]

  1. How can I debug this problem?  I'd like to file an appropiate bug
  on the corresponding bug tracker.

While I'm not a PulseAudio user myself, some of those I know use
it, so I'm somewhat interested in that, too.

(Thanks to Darac Marjal for his hints on P-A debugging elsewhere
in this thread, BTW.)

[…]

  I'm a software developer myself, and I can't help keep asking myself,
  why is PulseAudio an strong dependency on Gnome?  What advantages
  does PulseAudio gives me as a user over good ol' ALSA?

I remember playing with both GNOME and KDE back in 2000 or so.
Honestly, I still don't get what advantages do they give to me
over the good old “bunch of X applications” approach.

(Though I've discovered somewhat recently that there're a few
interesting Qt-based applications in Debian.  Previously,
anything depending on Qt was out of consideration for me.)

-- 
FSF associate member #7257


-- 
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/861uh4hqj2@gray.siamics.net



Re: Does nmap support IPv6 ranges now?

2012-08-18 Thread Ivan Shmakov
 Michelle Konzack linux4miche...@tamay-dogan.net writes:

[…]

  Starting Nmap 5.00 ( http://nmap.org ) at 2012-08-18 20:24 CEST
  Invalid host expression: 2a01:4f8:d12:1300:0:0:0:0/64 -- slash not allowed.  
  IPv6 addresses can currently only be specified individually
  QUITTING!

It's the same for nmap 6.00-0.1 currently in Wheezy:

$ nmap -6 2001:db8::/64 

Starting Nmap 6.00 ( http://nmap.org ) at 2012-08-18 20:07 UTC
Invalid host expression: 2001:db8::/64 -- slash not allowed.  IPv6 addresses 
can currently only be specified individually
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 0.10 seconds
$ 

[…]

  Any suggestions how to make a discover on a whole network?

  Scanning single IPs takes forever and is no option...

  However, I have to scan networks like

  2a01:4f8:d12:1300:0:0:0:RANGE
  2a01:4f8:d12:1300:0:0:1:RANGE
  2a01:4f8:d12:1300:0:0:2:RANGE

  which mean, only /112 ranges.

I don't know why exactly the Nmap developers have omitted the
“range” support for IPv6, but it was my understanding that to
scan a range one effectively has to scan every single address of
that range, and a /112 network already has some 65536 of those!
With or without range support in Nmap, that is likely to take a
lot of time.

As for the options, a simplistic GNU Awk script can be used to
enumerate all the addresses in a range (unfortunately, an even
simpler seq(1) doesn't fit here), like:

$ gawk 'BEGIN {
for (i = 0; i = 0x; i++) { printf(2001:db8::1:%x\n, i); }
}' 

Such a list may then be fed into one (or more) nmap(1)
instances, like:

$ gawk 'BEGIN {
for (i = 0; i = 0x; i++) { printf(2001:db8::1:%x\0, i); }
}' \
  | xargs -r0 -L16 -- nmap -6 --

Please note that I've changed the \n in printf() above to \0 in
order to use a more robust $ xargs -0 variant.

OTOH, I'd suggest trying to use tcpdump(8) (or a similar tool)
to get the addresses of the active IPv6 hosts in the network,
then applying Nmap to those.  On a network with working IPv6
autoconfiguration (and thus some 2⁴⁸ addresses, based on EUI-48)
it seems like the only choice.

-- 
FSF associate member #7257  http://sf-day.org/  news:comp.unix.shell


-- 
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/86zk5sx7np@gray.siamics.net



Re: self signed repository

2012-07-05 Thread Ivan Shmakov
 Roger Leigh rle...@codelibre.net writes:
 On Thu, Jul 05, 2012 at 12:09:44PM +0400, stal...@locum.ru wrote:

[…]

  apt-key list show my key, but apt-get install mytestpackage show

  WARNING: The following packages cannot be authenticated!

  what i doing wrong?

  You also need the Release file in the apt repository signing.
  apt-get doesn't get check per-package signatures?  Individual
  packages aren't signed by default; just the archive as a whole via
  the Release/InRelease files.

I've never used such a feature myself, but I believe that
mini-dinstall(1) can maintain a signed Release file (and thus
the repository.)

-- 
FSF associate member #7257


-- 
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/8662a2bf5w@gray.siamics.net



Re: xen hypervisor security update.

2012-07-04 Thread Ivan Shmakov
 Mauro  mrsan...@gmail.com writes:

  In debian squeeze there are several xen security updates:

  xen-hypervisor xen-utils and so on.

  In the debian website there are no information on what are the fixes.

?

http://debian.org/security/2012/dsa-2501

  Where can I find them?

Apart from checking http://www.debian.org/security/2012/ (and
http://debian.org/) regularly, one may also subscribe to the
debian-security@ mailing list, which is also available via
Gmane, e. g.:

http://dir.gmane.org/gmane.linux.debian.user
nntp://news.gmane.org/gmane.linux.debian.user/
http://news.gmane.org/gmane.linux.debian.user/
http://rss.gmane.org/messages/complete/gmane.linux.debian.user

and so on.

-- 
FSF associate member #7257


-- 
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/86a9zgc782@gray.siamics.net



radeon+ opencl+ non-free-: HOWTO?

2012-07-03 Thread Ivan Shmakov
Somehow, I've got the impression that OpenCL is supported by
some free development tools (Clang?)  Now, I wonder, if I'm
right on that, is there some kind of HOWTO on how to utilize
OpenCL via the free AMD Radeon driver included in Debian?  (I
hope it is possible, isn't it?)

TIA.

-- 
FSF associate member #7257


-- 
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/86mx3hc7py@gray.siamics.net



Re: radeon+ opencl+ non-free-: HOWTO?

2012-07-03 Thread Ivan Shmakov
 Camaleón  noela...@gmail.com writes:
 On Tue, 03 Jul 2012 20:08:57 +0700, Ivan Shmakov wrote:

  Somehow, I've got the impression that OpenCL is supported by some
  free development tools (Clang?)  Now, I wonder, if I'm right on
  that, is there some kind of HOWTO on how to utilize OpenCL via the
  free AMD Radeon driver included in Debian?  (I hope it is possible,
  isn't it?)

  There's a Debian wiki page altough I'm not sure if this will help to
  solve your questions :-)

  http://wiki.debian.org/ATIStream

Neither am I.

--cut: http://wiki.debian.org/ATIStream --
The AMD SDK is non-free.  […]
--cut: http://wiki.debian.org/ATIStream --

The page also mentions the opencl-headers package, which is
apparently relevant, though.

  And also, an article in Phoronix about this:

  How To Begin Using OpenCL With Radeon Gallium3D

  http://www.phoronix.com/scan.php?page=news_itempx=MTA3MjY

There also seems to be some information relevant to my task
(such as, e. g., notes on supported hardware.)

  Can't tell about the current development status.

ACK, thanks.

-- 
FSF associate member #7257


-- 
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/86ipe4d8zf@gray.siamics.net



Re: Interface configuration - inet6 issues

2011-11-04 Thread Ivan Shmakov
 Axton  axton.gr...@gmail.com writes:

(Please also consider joining the news:comp.os.linux.networking
and news:alt.os.linux.debian Usenet newsgroups.  In particular,
these are available via the free http://Aioe.org/ service, as
well as through http://groups.google.com/.)

  To add to this, the following results in a /etc/network/run/ifstate
  that does not show eth1:

There's a generic reason of ifstate not being updated after an
ifup(8) invocation due to a failed pre-up or post-up command.
Thus, I'd try to debug this problem by running ifup(8) with
--verbose, like:

# ifup -v eth1

Such a command would likely to point out the failed command.

Please note that it may be necessary to manually deconfigure the
now-misconfigured interface before invoking ifup(8) (as in:
# ip addr del.)

  root@ntp01:/# cat /etc/network/interfaces
  auto lo
  iface lo inet loopback

  auto eth1

  iface eth1 inet static
  address 10.0.4.240
  netmask 255.255.252.0
  broadcast 10.0.7.255

There's little point in specifying a broadcast address
coinciding with the one that'd be the default for this
configuration.

  gateway 10.0.4.1

  iface eth1 inet6 static
  address 2001:740:7063:10::240
  netmask 64
  gateway 2001:740:7063:10::10
  pre-up echo 0  /proc/sys/net/ipv6/conf/eth1/autoconf
  pre-up echo 0  /proc/sys/net/ipv6/conf/eth1/accept_ra

Why not to use # sysctl -w here instead?  Also, using explicit
interface names in these commands may lead to hard to debug
issues when fragments are moved or copied between different
iface stanzas, especially if the interface names look similar.

Thus:

pre-up sysctl -w net.ipv6.conf.$IFACE.accept_ra=0

  root@ntp01:/# cat /etc/network/run/ifstate
  lo=lo

  The interfaces are configured as follows with the above
  configuration:

Then it's my guess that the interface wasn't correctly
deconfigured before invoking ifup(8).  (It might've been a
failed pre-up command, but then the interface wouldn't have been
assigned the addresses.)

[…]

-- 
FSF associate member #7257


-- 
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/86fwi46o28@gray.siamics.net



Re: Usenet news - server required

2011-11-04 Thread Ivan Shmakov
 Sian Mountbatten poenik...@operamail.com writes:

[…]

  And I found a news server on the web-site www.eternal-september.org
  which someone suggested.

Note also that thanks to Gmane, it's possible to read and post
to this very mailing list via a newsreader, too.  Check, e. g.:

http://dir.gmane.org/gmane.linux.debian.user

[…]

-- 
FSF associate member #7257


-- 
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/86boss6nr6@gray.siamics.net



Re: command to mv files folders to dir

2011-09-25 Thread Ivan Shmakov
 Mark Panen mark.pa...@gmail.com writes:
 On Sun, Sep 25, 2011 at 12:43 AM, Tom Furie t...@furie.org.uk wrote:
 On Sat, Sep 24, 2011 at 05:00:47PM +0700, Ivan Shmakov wrote:
 Tom Furie t...@furie.org.uk writes:

  What's wrong with 'mv /mnt/deer/* /mnt/deer/zebra'? Sure, it'll
  complain about trying to move zebra to itself, but it works.

  The other catch is that it won't consider the filenames with a
  leading dot, such as ‘.bashrc’.

  Well, true, but there was no mention of dot files in the original
  problem.

Neither it was stated that there were no such files.

[…]

  yes only the files put in /mnt/deer on 22/09/2011 must be moved to
  there own folder, but looks like i will have to spend days doing this
  manually as zebra is 378 gb big and i copied some files from zebra to
  /mnt/deer using cp (my bad) and i don't have much room to play with
  now as i only have 197gb left in /mnt/deer and a lot of duplicate
  files in /mnt/deer and /mnt/deer/zebra

To find the duplicates, the command like the following could
have been used:

$ cd /mnt/deer/ \
   find . -type f -not -wholename ./zebra/\* \
 -exec cmp -- {} zebra/{} \; \
 -print 

While to remove them (after double-checking!), the final -print
can be replaced with:

 -exec rm -v -- {} + 

-- 
FSF associate member #7257


-- 
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/8639fljbde@gray.siamics.net



[g.l.d.user] Re: command to mv files folders to dir

2011-09-25 Thread Ivan Shmakov
 Mark Panen mark.pa...@gmail.com writes:
 On Sat, Sep 24, 2011 at 1:12 PM, Ivan Shmakov wrote:
 Mark Panen mark.pa...@gmail.com writes:
 On Sat, Sep 24, 2011 at 11:53 AM, Ivan Shmakov wrote:

[Cross-posting to comp.unix.shell for no good reason at all.]

[…]

  $ mkdir -pv -- /mnt/deer/zebra \
 find /mnt/deer/ -maxdepth 1 -mindepth 1 -not -name zebra \
   -exec mv --target-directory=/mnt/deer/zebra -- {} + 

  will this mv only the file/folders created on the 22/09/2011, i
  want the older files etc to stay behind.

  Somehow, I didn't understood that as part of the task.

  The -ctime constraint to find(1) may be helpful here, like:

  $ mkdir -pv -- /mnt/deer/zebra \
 find /mnt/deer/ \
   -maxdepth 1 -mindepth 1 -ctime -3 -not -name zebra \
   -exec mv --target-directory=/mnt/deer/zebra -- {} + 

  However, note that the Unix' “change time” is /not/ the file
  creation time (I know of no Unix filesystem to track the latter),
  but they /should/ coincide in this particular case.

  Note also that if the filesystem under /mnt is not a Unix one (such
  as VFAT), it should be checked whether the ctime is actually set as
  desired.  Like:

  $ LC_ALL=C stat -- /mnt/deer/foobar 

  (Where foobar is one of the files copied 2011-09-22.)  Check if the
  Change: field is set to 2011-09-22.

  The command made a folder called zebra and put all the contents of
  /mnt/deer in /mnt/deer/zebra so did not achieve my plan, the time
  stamp is now set at 24th for all, according to $ LC_ALL=C stat --
  /mnt/deer/,

Yes, because renaming the file is also counted as a “status
change.”

  ctime -3 seems to be the problem.

I should've cautioned better about the use of change time as a
distinguishing property.  Namely, the files that have properly
resided in /mnt/deer/ had to be checked for whether their
timestamps are distinct to those recently copied there.

I see two probably causes for the -ctime failure.  First of all,
if the other files were also “changed” recently (e. g., their
content or access mode changed, or they were renamed, or
created), -ctime may have been way too rough a constraint.  For
these cases, -cmin may fit better, but it's typically harder to
use.

Also, the filesystem of /mnt/deer/ may somehow lacked the
support for change timestamps, or had them behaving differently.

That being said, there're still ways to recover, though these
are even less straightforward than those for the original
problem.

E. g., a list of all the filenames directly under the original
sources for either /mnt/deer/ or /mnt/deer/zebra/ could be
composed.  Like, e. g.:

$ cd /orig/deer/   find -mindepth 1 -maxdepth 1 -print  /tmp/deer.list 
$ cd /orig/zebra/  find -mindepth 1 -maxdepth 1 -print  /tmp/zebra.list 
$ 

(I hereafter assume that filenames do not contain any special
codes, such as ASCII LF, or Line Feed, or 10.)

Now, as everything is now below /mnt/deer/zebra/, let's try to
bring those originally in /orig/deer/ back into /mnt/deer/:

$ (while read f ; do \
   mv -vi -- /mnt/deer/zebra/$f /mnt/deer/$f ; \
   done)  /tmp/deer.list 

Of course, the above will consider only the filenames.  It's
impossible to recover if there were two distinct files under
/orig/deer/ and /orig/zebra/ sharing a single (relative)
filename.  (Though that's mainly because one of them was written
over the other thanks either to the original cp(1), or to mv(1)
in the recovery attempt above.)

-- 
FSF associate member #7257


--
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/86pqiphvjk@gray.siamics.net



Re: command to mv files folders to dir

2011-09-25 Thread Ivan Shmakov
---BeginMessage---
2011-09-25, 15:32(+07), Ivan Shmakov:
[...]
   (I hereafter assume that filenames do not contain any special
   codes, such as ASCII LF, or Line Feed, or 10.)

[...]

Or backslashes, or trailing blanks.

 $ (while read f ; do \
mv -vi -- /mnt/deer/zebra/$f /mnt/deer/$f ; \
done)  /tmp/deer.list 
[...]

Also note that mv with -i might read from its standard input, so
you may prefer:

ret=0
while IFS= read 3 -r f; do
  mv -vi -- /mnt/deer/zebra/$f /mnt/deer/$f || ret=$?
done 3 /tmp/deer.list
(exit $ret)

See also xargs(1) to avoid having to use a shell loop.

-- 
Stephane


-- 
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/86ipogj44o@gray.siamics.net

---End Message---


/home layout and permissions

2011-09-24 Thread Ivan Shmakov
 Sven Joachim svenj...@gmx.de writes:
 On 2011-09-24 08:21 +0200, Mark Panen wrote:

[A kind of follow-up to an old news:comp.unix.shell thread [1].]

[1] news:87pr9pzgjl.fsf...@violet.siamics.ipv6.uusia.org
From: Ivan Shmakov oneing...@gmail.com
Newsgroups: comp.unix.shell
Subject: non-FHS hierarchies: /var/home, /var/public, /var/public/storage
Date: Thu, 17 Sep 2009 23:23:26 +0700
(Somehow, Google Groups knows nothing about it.)

  What is the out the box permissions for /home/* on Squeeze?

  0755, adjust the DIR_MODE variable in /etc/adduser.conf if you like
  to change that.

My current preference is to have the following layout under
/home:

/home
|-- …
|-- private
|   |-- …
|   `-- users
|   `-- USERNAME— user's home directory (mode: 0700);
`-- public
|-- …
|-- users
|   `-- USERNAME— user's public directory (0755);
`-- storage
|-- …
`-- users
`-- USERNAME— user's “storage” directory (0755.)

(As could be seen from the above, I no longer advocate the use
of a single filesystem for all the variable content; I now
prefer to use separate filesystems for /var and /home.)

In principle, the arrangement above could be extended with some
‘groups’ directories as well, though it seems to me that the
concurrent access may generally be error-prone.

For the “hardlinks” to work, it's advisable for /home/private/
and /home/public/ to share a single filesystem.

The storage/ hierarchy (residing on a separate filesystem) is
indented for the (typically larger) content of lower backup
priority.  There, one could put, e. g., the copies of anything
readily available for download over Internet.

It a typical setup, the public/users/ directories will also be
accessible via HTTP (via Apache's mod_userdir; with UserDir set
to /home/public/users/.)  If CGI is also desired, a
‘public_html’ link pointing to the respective public/users/
directory could be put into the user's home directory, in order
to satisfy the suexec(8)'s constraints.  (FWIW, I prefer to have
an HTTP server installed on all the hosts, unless there's a very
good reason not to install it.)

--cut: /etc/apache2/sites-available/example --
IfModule mod_userdir.c
UserDir /home/public/users
/IfModule
Directory /home/public/users
AllowOverride FileInfo Indexes AuthConfig Limit
Options Indexes ExecCGI SymLinksIfOwnerMatch IncludesNoExec
/Directory
--cut: /etc/apache2/sites-available/example --

It's also an option to have /home/public/ accessible via Rsync
just as well, but it should be noted that while user can easily
control HTTP access by placing .htaccess files where necessary,
Rsync couldn't be controlled in such a way.

--cut: /etc/rsyncd.conf --
[public]
path= /home/public
comment = Public directory
--cut: /etc/rsyncd.conf --

-- 
FSF associate member #7257


-- 
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/86wrcyjncv.fsf...@gray.siamics.net



Re: command to mv files folders to dir

2011-09-24 Thread Ivan Shmakov
 Mark Panen mark.pa...@gmail.com writes:

  Made a bit off a muck up off things when i backed up parts of my
  /home/mark directory to /mnt/deer

  In /mnt/deer i know have hundreds of files and folders which i
  rsynced on 22/09/2011.

  I need a command line option to put them all In one shot in
  /mnt/deer/zebra.

It's not what I'd usually call “one shot” (= atomic), but, IIUC,
the following single command line should do it:

$ mkdir -pv -- /mnt/deer/zebra \
   find /mnt/deer/ -maxdepth 1 -mindepth 1 -not -name zebra \
 -exec mv --target-directory=/mnt/deer/zebra -- {} + 

-- 
FSF associate member #7257  Join news:comp.unix.shell for pretty
much /everything/ related to the POSIX Shell language and its variants.


-- 
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/86sjnmjmfy@gray.siamics.net



Re: command to mv files folders to dir

2011-09-24 Thread Ivan Shmakov
 Tom Furie t...@furie.org.uk writes:
 On Sat, Sep 24, 2011 at 11:40:48AM +0200, Mark Panen wrote:

  In /mnt/deer i know have hundreds of files and folders which i
  rsynced on 22/09/2011.

  I need a command line option to put them all In one shot in
  /mnt/deer/zebra.

  What's wrong with 'mv /mnt/deer/* /mnt/deer/zebra'? Sure, it'll
  complain about trying to move zebra to itself, but it works.

The other catch is that it won't consider the filenames with a
leading dot, such as ‘.bashrc’.

-- 
FSF associate member #7257


-- 
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/86k48yjm40@gray.siamics.net



Re: command to mv files folders to dir

2011-09-24 Thread Ivan Shmakov
 Camaleón  noela...@gmail.com writes:
 On Sat, 24 Sep 2011 11:40:48 +0200, Mark Panen wrote:

  Made a bit off a muck up off things when i backed up parts of my
  /home/mark directory to /mnt/deer

  In /mnt/deer i know have hundreds of files and folders which i
  rsynced on 22/09/2011.

  I need a command line option to put them all In one shot in
  /mnt/deer/zebra.

  Not a command line but Midnight Commander is very good for such
  day-to- day tasks.

Following the suggestion of Victor Wagner (in
news:fido7.ru.unix.linux, I believe), I've dropped
Midnight Commander in favor of Bash something like a decade ago.

I've never regret the change.

Midnight Commander may simplify the simple things, but
whatever's your experience with it, the complex tasks are often
impossible.  On the contrary, Shell lets one to benefit from the
experience, and the solutions to the simpler tasks could usually
be re-used to solve the more complex ones.

Not to mention that the use of Shell keeps one's mind “in
shape.”

-- 
FSF associate member #7257


-- 
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/86bouajkoc@gray.siamics.net



Re: command to mv files folders to dir

2011-09-24 Thread Ivan Shmakov
 Mark Panen mark.pa...@gmail.com writes:
 On Sat, Sep 24, 2011 at 11:53 AM, Ivan Shmakov wrote:
 Mark Panen mark.pa...@gmail.com writes:

  Made a bit off a muck up off things when i backed up parts of my
  /home/mark directory to /mnt/deer

  In /mnt/deer i know have hundreds of files and folders which i
  rsynced on 22/09/2011.

  I need a command line option to put them all In one shot in
  /mnt/deer/zebra.

  It's not what I'd usually call “one shot” (= atomic), but, IIUC,
  the following single command line should do it:

  $ mkdir -pv -- /mnt/deer/zebra \
 find /mnt/deer/ -maxdepth 1 -mindepth 1 -not -name zebra \
   -exec mv --target-directory=/mnt/deer/zebra -- {} +

  will this mv only the file/folders created on the 22/09/2011, i want
  the older files etc to stay behind.

Somehow, I didn't understood that as part of the task.

The -ctime constraint to find(1) may be helpful here, like:

$ mkdir -pv -- /mnt/deer/zebra \
   find /mnt/deer/ \
 -maxdepth 1 -mindepth 1 -ctime -3 -not -name zebra \
 -exec mv --target-directory=/mnt/deer/zebra -- {} + 

However, note that the Unix' “change time” is /not/ the file
creation time (I know of no Unix filesystem to track the
latter), but they /should/ coincide in this particular case.

Note also that if the filesystem under /mnt is not a Unix one
(such as VFAT), it should be checked whether the ctime is
actually set as desired.  Like:

$ LC_ALL=C stat -- /mnt/deer/foobar 

(Where foobar is one of the files copied 2011-09-22.)  Check if
the Change: field is set to 2011-09-22.

-- 
FSF associate member #7257  Join news:comp.unix.shell for pretty
much /everything/ related to the POSIX Shell language and its variants.


-- 
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/867h4yjirp@gray.siamics.net



Re: which one: xfig, dia or inkscape

2011-09-22 Thread Ivan Shmakov
 abdelkader belahcene abelahc...@gmail.com writes:

  until now, I used xfig to draw my figures and graphs, but I am not
  satisfied, specially when I want to no latin caracters or formula
  (like in latex)

The PostScript graphics produced by XFig could often easily be
combined with LaTeX formulae thanks to the ‘psfrag’ package (as
in: \usepackage {psfrag}.)  Unfortunately, it's fundamentally
incompatible with pdflatex(1).

Alternatively, the graphics could be turned into any of the
“editable” vector formats that could be referenced from within a
LaTeX document (such as PIC, MetaPost, etc.) and manually edited
to add all the necessary text and formulae.

  I tried inkscape it seems better ???

Inkscape is essentially the same, but it uses a standard format
(SVG) for its graphics, instead of inventing its own (what XFig
did, preasumably because there was no such a format at the time
XFig was developed.)  Also, both the SVG format and Inkscape
itself, AIUI, have much better support for internationalization.

Unfortunately, doing formulae in Inkscape is nowhere as easy as
it's in LaTeX.

There's, however, the pMMLtoSVG package, which is supposed to
produce quality SVG rendering of formulae typeset in
Presentation MathML.  Also, there're a few converters from
pseudo-TeX format to MathML (check, e. g., the ttm and latexml
Debian packages.)  I don't know whether pMMLtoSVG is currently
in a usable state, though.  (It's my opinion that the project
would benefit should a few more volunteers join in.)

  what about dia ??

Dia has support for what I prefer to call “parametric graphics”.
I. e., it could be extended by “plugins”, each providing a
particular “parametric” shape.  E. g., there could be a plugin
that draws a star, which has the number of points as the
parameter.  To the best of my knowledge, it's the sole advantage
of using Dia instead of either Inkscape or XFig.

  I want to a good choice.  any idea thanks a lot

-- 
FSF associate member #7257


-- 
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/86fwjoltjs@gray.siamics.net



Re: 100% used / file system. Help!

2011-09-20 Thread Ivan Shmakov
 Darac Marjal mailingl...@darac.org.uk writes:
 On Tue, Sep 20, 2011 at 03:31:26PM +0100, Lisi wrote:

  I have accidentally filled something, that I shouldn't have,  on my root
  directory, and have now got a 100% usage of the disk containing my /. This
  is causing me problems. (Now there's a surprise!!)

  I have no backup of my /. Yes, I know. I deserve everything I've got. But
  now that I have been given my just deserts, can any kind soul come to my
  rescue? I would be so grateful I may, of course, just have to
  reinstall. :-(

  You should be able to find the largest files on your filesystem by
  running the following command:

  find / -xdev -exec stat --printf '%s\t%N\n' {} \;|sort -n

It could actually be simplified down to:

# du -x --all / | sort -n 

  It will probably take a few minutes to execute, but you should get
  back a list of files, sorted by size, the last few files being the
  largest.

(Though I'd prefer -r -n, so that the largest are to come
/first/.)

Back to the original problem, iff the logs (/var/log/) are on
the root filesystem, I'd probably start from there.  It makes
sense to backup this directory to a removable drive, but if it's
not an option, the older logs (as in, e. g.: debug.[3-9].gz) may
simply be deleted at once, to get some spare filesystem space.

-- 
FSF associate member #7257


-- 
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/86zkhzmets@gray.siamics.net



Re: 100% used / file system. Help!

2011-09-20 Thread Ivan Shmakov
 Andrew McGlashan andrew.mcglas...@affinityvision.com.au writes:
 Lisi wrote:

  I have no backup of my /. Yes, I know. I deserve everything I've
  got. But now that I have been given my just deserts, can any kind
  soul come to my rescue? I would be so grateful I may, of course,
  just have to reinstall. :-(

  A few areas to have a quick look at (if they are part of your root
  fs)...

  /dev -- there could be a device you tried to use somehow and
  instead of using the device, because it wasn't there, it created a
  normal file.

  /var -- there are some cache areas here, perhaps using heaps by
  aptitude?  /var/cache/apt/archives

Good points.  (Of course, assuming that either or both of /dev/
and /var/ are on the root filesystem.)  For the latter case,
perhaps # apt-get autoclean (or even # apt-get clean) may be
both helpful and reasonably safe.

  /tmp

As a matter of personal preference, I'm using tmpfs for /tmp,
like:

$ grep -F /tmp /etc/fstab 
tmpfs   /tmptmpfs   defaults0   0

Given that I'll also allocate at least a few GiB's of disk space
for the swap (yet another personal preference), there could be a
plenty of temporary space under my /tmp/'s.

-- 
FSF associate member #7257


-- 
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/86r53bme68@gray.siamics.net



Re: automated editing of text files

2011-09-18 Thread Ivan Shmakov
 Aéris  ae...@imirhil.fr writes:
 Le 17/09/2011 00:40, Bob Proulx a écrit :

[…]

  * Secondly if the add-pre-nl.sh script handle multiple file
  arguments then instead of \; use + so that it calls it fewer times
  with as many file arguments as possible.  It will be more efficient
  that way.

  In this case, I prefere using « xargs » :

  find -type f -name *.txt | xargs add-pre-nl.sh

  And if there is space/single-quote/double-quote/new-line in some
  filenames :

  find -type f -name *.txt -print0 | xargs -0 add-pre-nl.sh

And to prevent xargs(1) from starting the command if there're no
arguments to pass (IOW, no .txt files found), -r should be used
as well.

Consider, e. g.:

 $ find -type f -print0 | xargs  -0 -- cat -- 

vs.:

 $ find -type f -print0 | xargs -r0 -- cat -- 

The former will read stdin if no regular files under the current
directory (a subtle change in behavior of cat(1) when called
without arguments), while the latter won't, and will just
produce no output.

[…]

-- 
FSF associate member #7257


-- 
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/86zki2pbn1@gray.siamics.net



[g.l.d.user] Re: A quick Q: how do I command something in large amount

2011-09-18 Thread Ivan Shmakov
The following message is a courtesy copy of an article
that has been posted to comp.unix.shell as well.

 Arnt Karlsen a...@c2i.net writes:
 On Fri, 16 Sep 2011 00:17:47 +0700, Ivan wrote:

[Cross-posting to comp.unix.shell for no good reason at all.]

  Whitespace is not a problem as long as one remembers to double-quote
  Shell $ubstitutions, like:

  for i in a b c ; do

  ..or, e.g.: for i in $(ls /path/to/files/*.txt ) ; do

No, it isn't whitespace-tolerant, as the result of the unescaped
$()-substitution is subject to IFS-splitting.  The correct form
would be:

for i in /path/to/files/*.txt ; do something ; done 

Consider, e. g.:

$ ls -1 
a
b c
$ (for x in $(ls *) ; do echo .$x. ; done) 
.a.
.b.
.c.
$ 

Moreover, ls(1) is an extra here; the command above requests the
Shell to search for all the .txt filenames in /path/to/files/,
then the filenames are passed to ls(1), which is supposed to
pass them back to the shell unaltered.  There, ls(1) may
essentially behave the same as, say, $ echo, or $ printf %s\\n.

This is somewhat akin to UUoC, as in:

$ cat  $file | grep something 

vs. simply:

$ grep something  $file 

Or it may not.  Consider that one of the .txt-filenames refers
to a directory, like:

$ ls -1RF 
.:
a
b c
d/

./d:
x y
$ (for x in $(ls *) ; do echo .$x. ; done) 
.a.
.b.
.c.
.d:.
.x.
.y.
$ 

Note that the above has ‘x’ set to ‘d:’, ‘x’ and ‘y’, neither of
whose belong to the current directory.

(NB: the term “path” is also considered obsolete by GNU when
speaking of “whole names”, as opposed to “search paths”, such
as, e. g., $PATH or $CDPATH.  In particular, GNU find(1)
states that -wholename is preferred to -path.)

txt2pdf -input ${i}.txt -out ${i}.pdf
  done

  ..disclaimer: I've only used the alleged obsolete back-tick way. ;o)

The backticks are harder to both nest and mix with other Shell
substitutions and escapes.  Consider, e. g.:

$ echo \\\ 
\
$ 

To put the stdout of the command above into a Shell variable, we
may use either the $()-substitution:

$ x=$(echo \\\) ; echo $y 
\
$ 

or the backticks:

$ y=`echo \\` ; echo $y 
\
$ 

Now, can you explain why the backslashes above have to be
doubled in the latter case?

-- 
FSF associate member #7257


--
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/86fwjtp3qr@gray.siamics.net



Depends: logrotate (forever and ever and ever)

2011-09-18 Thread Ivan Shmakov
 Andrei Popescu andreimpope...@gmail.com writes:
 On Vi, 16 sep 11, 00:48:25, Ivan Shmakov wrote:

[Cc: debian-devel@, for this discussion fits there better.]

  I wonder if there should be a separate mailing list to Cc: such bug
  reports.  (debian-dependency-inquisitors@, perhaps?)

  I don't think dependencies need any special handling compared to
  other bug reports. In cases where you don't agree with the resolution
  you can discuss the issue - together with the maintainer - on
  debian-devel.

Perhaps.

  I seem to remember that there was a longstanding issue with Depends:
  logrotate.  Of course, no package should ever be “rendered unusable”
  (which, AIUI, is the very essense of Depends:) should logrotate not
  be installed!

To quote the policy:

--cut: http://www.debian.org/doc/debian-policy/ch-relationships.html --
The Depends field should be used if the depended-on package is
required for the depending package to provide a significant amount
of functionality.
--cut: http://www.debian.org/doc/debian-policy/ch-relationships.html --

Cf.:

--cut: http://www.debian.org/doc/debian-policy/ch-relationships.html --
Recommends
This declares a strong, but not absolute, dependency.

The Recommends field should list packages that would be found
together with this one in all but unusual installations.
--cut: http://www.debian.org/doc/debian-policy/ch-relationships.html --

  Yet, there seem to be something like 45 packages that Depends: on it
  as per Debian Wheezy.

  Could you provide concrete examples?

Sure.

$ apt-cache show $(apt-cache rdepends logrotate | sed -e '/^  /!d; s///') \
  | grep-dctrl -s Package -F Depends --regex --pattern=logrotate \
  | LC_ALL=C sort -u \
  | sed -e '/^Package: /!d; s///' | fmt -w72 
aolserver4-daemon argus-server atop battery-stats boa cherokee
clamav-base clamav-freshclam clamav-milter deejayd deejayd-webui
interchange ippl knockd leafnode libvirt-bin lusca mailman mgetty
muddleftpd net-acct ninja prayer privoxy pyca pygopherd quagga
rabbitmq-server rsnapshot sipwitch sks slbackup snort snort-mysql
snort-pgsql squid squid3 tinyproxy twatch uucp
$ 

  I assume packages not logging to syslog do need some rotation of
  their logs, otherwise they could render systems unusable by filling
  up the drive.

The use of logrotate doesn't prevent it; and the lack of such
use doesn't force it, either.

In particular, when the package is installed into a chroot (say,
for testing), the Cron daemon is typically not run from there.
Thus, chroot'ed logrotate won't ever be run, and won't have any
effect on the free filesystem space.

Also, certain server packages may be run both privileged (as a
system service) and unprivileged (for just the invoking user.)
(Think of, e. g., Rsync, but INN also can be configured in such
a way.)  There, logrotate is ineffective just as well, as the
packaged configuration files certainly won't reference the
filenames used by the particular user.

Note that there's a reasonable amount of packages which either
Recommends: or Suggest: logrotate instead:

$ apt-cache show $(apt-cache rdepends logrotate | sed -e '/^  /!d; s///') \
  | grep-dctrl -s Package --not -F Depends --regex --pattern=logrotate \
  | LC_ALL=C sort -u \
  | sed -e '/^Package: /!d; s///' | fmt -w72 
atftpd bdii cacti cricket cron ctdb distributed-net dsyslog heartbeat
heimdal-kdc horde3 kdm ldirectord liquidsoap masqmail mini-buildd-bld
mini-buildd-rep pawserv rsyslog samba selinux-policy-default
selinux-policy-mls sendmail-base sugarplum super sympa syslog-ng
thttpd tor vsftpd wu-ftpd wwwoffle xinetd xtel xtide zabbix-agent
zabbix-proxy-mysql zabbix-proxy-pgsql zabbix-proxy-sqlite3
zabbix-server-mysql zabbix-server-pgsql
$ 

Moreover, there's at least the dpkg package which, while
providing logrotate configuration files, doesn't mention
logrotate among its dependencies at all.

It's therefore my long-standing opinion that the dependency on
logrotate should be downgraded to Recommends:, unless, of
course, postinst or prerm do actually use anything provided by
the logrotate package (which seems to me unlikely.)

-- 
FSF associate member #7257


--
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/867h55p0r3.fsf...@gray.siamics.net



Re: A quick Q: how do I command something in large amount

2011-09-15 Thread Ivan Shmakov
 Jochen Spieker m...@well-adjusted.de writes:
 lina:

  for i in a b c
  do
  txt2pdf -input i.txt -out i.pdf
  done

  You almost nailed it:

  for i in a b c ; do
txt2pdf -input ${i}.txt -out ${i}.pdf
  done

  Instead of listing the files manually, you can use '*' as a wildcard.
  But that only works if your filenames don't contain whitespace.

Whitespace is not a problem as long as one remembers to
double-quote Shell $ubstitutions, like:

   for i in a b c ; do
 txt2pdf -input ${i}.txt -out ${i}.pdf
   done

  A more robust solution:

  find /dir/to/files -type f -print0 | \
  xargs -0 -I§ txt2pdf -input § -out §.pdf

find(1) has -exec, which simplifies the above to:

   find /dir/to/files -type f \
 -exec txt2pdf -input {} -out {}.pdf \; 

  This will produce filenames like a.txt.pdf, but you get the idea.

  xargs hast the additional benefit that you can use multiple cores at
  once when using the -P option.

  sorry I can only think of the debian user list to ask now.

There's also the news:comp.unix.shell newsgroup, dedicated to
the Shell language.

I haven't ever tried it, but I guess that using Google Groups
[1] shouldn't be much different to using Google Mail.

[1] http://groups.google.com/group/comp.unix.shell/

-- 
FSF associate member #7257  2 days left to Software Freedom Day
http://sf-day.org/  Event at Altai State University: http://sfd.am-1.org/


-- 
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/86ehzhsp1g@gray.siamics.net



Re: A quick Q: how do I command something in large amount

2011-09-15 Thread Ivan Shmakov
 Axel Freyn axel-fr...@gmx.de writes:

[…]

  So you should try e.g.

  for FILE in *.txt; do mv $FILE `basename \$FILE\ .txt`.pdf; done

Backticks are obsolete for a long time, and that's precisely the
reason.  Consider how much cleaner is the following:

   for FILE in *.txt; do mv $FILE $(basename $FILE .txt).pdf; done

Furthermore, Bash also allows one to spare a basename(1)
invocation, like:

   for FILE in *.txt; do mv $FILE ${FILE%.txt}.pdf; done

Finally, I'd like to make a few more changes:

   (for file in *.txt; do mv -- $file ${file%.txt}.pdf; done)

It is left as an exercise to the reader to figure out the
differences between the two.

  (this works at least with spaces in the filename...)

The last command above should work for any valid filename.

-- 
FSF associate member #7257  2 days left to Software Freedom Day
http://sf-day.org/  Event at Altai State University: http://sfd.am-1.org/


-- 
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/86aaa5socb@gray.siamics.net



Re: Debian Policy questions

2011-09-15 Thread Ivan Shmakov
 Andrei Popescu andreimpope...@gmail.com writes:
 On Lu, 11 iul 11, 14:51:48, William Hopkins wrote:

  Old thread, but still...

  Absolutely! Easy to find examples with apt-cache rdepends dbus. I
  would posit that nearly all packages that depend on DBUS should
  actually depend on libdbus{,-c++,-java,-ruby}. Do these packages
  (such as rhythmbox) fail to work if DBUS isn't running? No.. the
  calls are never calls required for running, only for nifty extra
  features like telling your systray what song you're listening to.

  [snip more explanations]

  As far as I can tell from my limited experience you are right. I
  would suggest you file bugs in the BTS as you find such
  occurrences. Of course it helps a lot if you also provide patches and
  maybe also raise the severity a bit. 'wishlist' is very polite, but
  'minor' or even higher might be apropiate in some cases.

  If you don't receive any reply you could investigate whether the
  package is unmaintained and take action accordingly.

I wonder if there should be a separate mailing list to Cc: such
bug reports.  (debian-dependency-inquisitors@, perhaps?)

I seem to remember that there was a longstanding issue with
Depends: logrotate.  Of course, no package should ever be
“rendered unusable” (which, AIUI, is the very essense of
Depends:) should logrotate not be installed!  Yet, there seem to
be something like 45 packages that Depends: on it as per Debian
Wheezy.

-- 
FSF associate member #7257  2 days left to Software Freedom Day
http://sf-day.org/  Event at Altai State University: http://sfd.am-1.org/


-- 
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/8662ktsnme@gray.siamics.net



Re: detecting which pts from vt

2011-09-12 Thread Ivan Shmakov
 Mike McClain mike.j...@cox.net writes:

  I'm regularly wanting to transport some text from a vt to an xterm
  window

Is using GNU Screen or tmux an option?  They both enable one to
have a single “terminal window” to be shared between any number
of VT's, XTerm's, SSH terminal session's, etc.

(My personal opinion is that GNU Screen is /essential/ to any
“terminal” work.)

  so I wrote a little function :

  toX () {   echo $* /dev/pts/1 }

Note that while $* is fine with echo, $@ is likely to be more
appropriate when used with other commands.  (I saw them often
used interchangeable, while they're in fact not.)

  only to find that when xwindows/icewm starts up it doesn't always
  open windows in the same order.

[…]

  Is there a way from the CL to detect which pts is the plain xterm
  window or to cause X to open the windows in a specified order?

I know of no fully automated way to do that, but:

thisistheterm () { ln -vsf -- $(tty) $HOME/.theterminal ; }
toterm() { echo $*  $HOME/.theterminal ; }

There, $ thisistheterm is used from within a terminal to mark it
as the destination for the subsequent $ toterm commands.

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/867h5dycb2@gray.siamics.net



Re: keyboard question..

2011-09-11 Thread Ivan Shmakov
 lina  lina.lastn...@gmail.com writes:
 On Sep 10, 2011, at 23:40, Camaleón noela...@gmail.com wrote:

[…]

  Google (and also our priceless Debian Reference Guide¹) says it has
  to

  How did you input the little 1 in plain email text? 

Thanks to Unicode, UTF-8, and MIME, e-mail messages' text is no
longer as plain as it used to be.

In my experience, an easier way to add an “exotic” character is
just to copy-paste it from somewhere.  Usually, I'd use [1] and
the following list for reference, but as there is a way to enter
Unicode code points with keyboard in X, [2] may also be of
interest.

«» nM: –— double: “” single: ‘’ nbsp:   degree: ° mult: × bullet: •
hellip: … pi: π mu: μ \pm: ± ^2: ² ^3: ³ \mp: ∓ \(-\): − \,:  ;
logand: ∧; logior: ∨; r/arrow: →; lsquo/rsquo: ‹, › \textnumero: №
\copyright: ©

[1] 
http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
[2] http://www.unicode.org/charts/

[…]

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/861uvn0x0y@gray.siamics.net



Re: /usr broken, will the machine reboot ?

2011-09-10 Thread Ivan Shmakov
 jacques  jacq...@lavignotte.org writes:
 Le 10/09/2011 14:25, Mark Neidorff a écrit :

[…]

  2. mount /usr as read only

  What about updating software

# mount -o remount,rw /usr 
# … upgrade… 
…
# mount -o remount,ro /usr 
# 

[…]

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/86mxec2x0w@gray.siamics.net



Re: /usr broken, will the machine reboot ?

2011-09-10 Thread Ivan Shmakov
 Itay  deb...@itayf.fastmail.fm writes:
 On Sat, 10 Sep 2011, Ivan Shmakov wrote:
 jacques  jacq...@lavignotte.org writes:
 Le 10/09/2011 14:25, Mark Neidorff a écrit :

  2. mount /usr as read only

  What about updating software

  # mount -o remount,rw /usr
  # … upgrade…
  …
  # mount -o remount,ro /usr
  #

  Any special care in case that /usr/local is an independent file
  system that is mounted separately?

None that I can think of right now.

When performing maintenance of non-Debian software, /usr/local
is remounted read-write before and read-only after.  For the
software coming from the Debian packages, the same is done
against /usr.

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/86fwk42jpf@gray.siamics.net



Re: a quick Q: how to back to the head in terminal

2011-09-09 Thread Ivan Shmakov
 Camaleón  noela...@gmail.com writes:
 On Fri, 09 Sep 2011 23:59:08 +0800, lina wrote:

[…]

  ctrl-a does the trick.

  Thanks for both of you.

  Quid Pro Quo as Dr. Hannibal Lecter would have say :-)

  Lina!! Thanks much!!

  I was looking for such option (a home/end keyword replacement) as
  my netbook also lacks of it but still not found it... until your post
  :-D

  crtl-e seems to jump the cursor at the end of the line. Great!

GNU Readline mimics closely the key bindings of GNU Emacs.  In
particular, there's also incremental search backward (C-r) and
forward (C-s ^1) over the history, multi-level cut (C-u, C-k,
M-DEL, M-d) and paste (C-y; M-y for cycling over the contents of
the kill ring), M- and M- to get to the first and the last
command in the history, respectively, …

^1 … provided that it's passed to the application; one may require to
re-bind or turn off the “stop” (C-s by default) key for that
with stty(1).

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/86wrdh4q8f@gray.siamics.net



Re: a quick Q: how to replace the value quickly

2011-09-09 Thread Ivan Shmakov
 John L Cunningham djoh...@gmail.com writes:
 On Sat, Sep 10, 2011 at 12:03:06AM +0800, lina wrote:

  suppose there is a variable in some bash like i, so in some process
  I used $i so lots,

  but I wanna test one long command on terminal,

  which as like

  run -a $i.pdf -b $i.pdf -c $i.pdf -d $i.pdf,

  how can I change $i very quickly except one by one to

  run -a 1.pdf -b 1.pdf -c 1.pdf -d 1.pdf,

  Thanks ahead for any suggestions,

  export i=whatever_you_want_here

One shouldn't use ‘export’ here, unless, of course, the intent
is to pass this variable to all the processes started from
within that shell.  Plain $ i=value will do, as in:

$ (i=world ; printf 'Hello, %s!\n' $i) 
Hello, world!
$ 

(The parentheses there ensure that the variable will be used for
this command line only and will not linger.)

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/86sjo54q0l@gray.siamics.net



Re: Problem installing Etch using local mirror

2011-09-09 Thread Ivan Shmakov
 Bob Proulx b...@proulx.com writes:

[…]

  Another possibility would be Syslinux.  The upstream Syslinux site is
  down for me at this moment making it hard for me to check docs but as
  I recall it still supports floppy disk booting and has a process to
  bootstrap a network boot from a floppy disk boot.  And etherboot.

I vaguely recall that Etherboot has become gPXE some time ago.

In my experience, a floppy with gPXE installed instantly brings
the network boot capability to older hardware.

[…]

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/86obyt4ht1@gray.siamics.net



Re: tmux conf stuck

2011-09-08 Thread Ivan Shmakov
 debian  deb...@waysoft.com writes:

[…]

  Ctrl-A didn't work, but backtick still did!

  -I tried to put an obvious error in ~/.tmux.conf... undetected by tmux.
  -I tried inserting an unbind ` into ~/.tmux.conf... backtick tick
  works.
  -I tried deleting ~/.tmux.conf... backtick still works!

[…]

  -Nothing obvious in the environment, or /tmp.

I'm not familiar with tmux, but did you look at $ ps x?

  So... why can I not get rid of the ghost of the old ~/.tmux.conf???

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/861uvr55yf@gray.siamics.net



Re: virt terminal font problem

2011-09-04 Thread Ivan Shmakov
 Whit Hansell skippe...@comcast.net writes:

[…]

  I had a problem when I purchased a new monitor, an LCD, and it
  required me to put vga=785 at the end of the Kernel line in
  menu.list file in order to get any video out of the Virtual Terminal
  (F1-6).  Now that I have reinstalled w. Wheezy, I have the Virtual
  Terminal but the font size is extremely tiny.  I cannot see it well
  at all and I have a vision problem to start with.

Newer Linux  userland VT tools' default is to use video card's
graphics mode via a framebuffer console driver, instead of the
text mode, which was the older default.

My guess is that blacklisting the framebuffer drivers in
modprobe.d(5) will allow one to use the text mode as before, but
I haven't tried it yet.  (I currently have no access to a
hardware running Wheezy.)

It's also possible to use the Terminus fonts (as of
console-terminus, IIRC), e. g.:

$ setfont -f /usr/share/consolefonts/Uni3-TerminusBold28x14.psf.gz 

Depending on the actual screen resolution, a font of up to 32x16
pixel size may be chosen.

  This problem w. terminal starts after boot when it gets to a certain
  point, I'm assuming init.d, but not sure.  While it's trying to check
  hardware items it's fine, the standard 80 X 25 large font terminal
  screen.  Then all of a sudden it changes to the small/tiny font

… And it's the time the framebuffer drivers get loaded.

  and just before it brings up the splash screen, it sometimes messes
  up the whole screen and puts across the top of the screen garbled
  lines for just a second, then the splash screen pops up and I have no
  problem logging in.

Note also that since newer reboot(8) doesn't go through the BIOS
(it only reinitializes the kernel), the screen will be garbled
at reboot as well.

[…]

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/86wrdn7e7c@gray.siamics.net



Re: About the `-u' option of `cp' command

2011-09-03 Thread Ivan Shmakov
 Sven Joachim svenj...@gmx.de writes:
 On 2011-09-03 09:58 +0200, Rodolfo Medina wrote:

[…]

  Now, it happens sometimes to me that, even with `-u', `cp' will copy
  the file also when it isn't newer at all than the destination file,
  as here:

  $ ls -lh ing.tex /mnt/pendrive2/ing.tex 
  -rw-r--r-- 1 rodolfo rodolfo 163K 2011-08-31 18:44 ing.tex
  -rwxr-xr-x 1 rodolfo rodolfo 163K 2011-08-31 18:44 /mnt/pendrive2/ing.tex
  $ cp -viup ing.tex /mnt/pendrive2
  cp: overwrite `/mnt/pendrive2/ing.tex'?

  Why this, and how to avoid it?

  Might be due to high resolution timestamps on the source filesystem,
  but not on the target (the pendrive seems to have an FAT filesystem).
  Use the --full-time ls option to find out.

Please note that the filesystems of the FAT family have 2 second
time resolution, while the usual Unix filesystems have 1 second
resolution at worst.  Therefore, the original file may be
18:44:55, and the destination is 18:44:54 (i. e., time gets
truncated.)

Using rsync(1) and --modify-window= will probably solve the
problem.  Consider, e. g.:

$ rsync -v -urt -O --modify-window=1 -- \
  ing.tex /mnt/pendrive2/ 

(The -v -urt Rsync options roughly correspond to the -v -urp
cp(1) ones.)

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/8639ge9f8m@gray.siamics.net



configuring XKB via xorg.conf

2011-09-02 Thread Ivan Shmakov
How do I configure XKB via xorg.conf?  I'd like to configure XKB
as the following setxkbmap(1) invocation does, but right at the
X server's startup time.

$ setxkbmap -option terminate:ctrl_alt_backspace,keypad:legacy 

And how do I get Shift + Num Lock “mouse keys” working, BTW?

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/86fwkeanto@gray.siamics.net



Re: [OT] Re: unsuscribe

2011-09-01 Thread Ivan Shmakov
 Eduardo M KALINOWSKI edua...@kalinowski.com.br writes:
 On Qui, 01 Set 2011, Tony van der Hoff wrote:

  This one didn't (here).

  Is there any concensus on what/how/when these footers are added? It
  seems quite random to me.

  That message was GPG-signed, the footer is not added because it would
  break the signature. (Actually, it was added to another part of the
  multi-part message, but I could only see that by looking at the
  message source.)

  I believe HTML mails also do not get the footer (or something along
  the same lines is done).

Curiously enough, the message I'm replying to [1] didn't have
the footer, either.  (I'm looking at it as raw text, so MIME
doesn't matter.)

However, its Content-Type: is:

Content-Type: text/plain; charset=utf-8; format=flowed; DelSp=Yes

Which, I guess, is to be blamed for that, thanks to “DelSp=Yes”.
Seemingly, the mailing list software only adds the footer for
the single-part messages whose Content-Type: it recognizes.

[1] news:20110901150151.horde.x0w0jmm_qovox8ip2ktq...@mail.kalinowski.com.br

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/861uvzblq9@gray.siamics.net



Re: Serial port with Lenny

2011-08-31 Thread Ivan Shmakov
 alex padoly alex.pad...@laposte.net writes:

  How I can know if the serial port is active, gphoto2 doent find my
  camera (OLYMPUS C-2000Z), this camera is supported by ghphoto2.

Use statserial(8) to monitor the serial port state in real time.
Try connecting and disconnecting the device to (from) the port.
Watch if anything changes.

If it doesn't, it may be either that the cable or the port (or
both) are inoperational, or it was a wrong port.  (It was quite
typical for a machine to have two serial ports not so long ago.)

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/8639ghd5f4@gray.siamics.net



Re: String Manipulation and a Need for RS-232

2011-08-30 Thread Ivan Shmakov
 Martin McCormick mar...@x.it.okstate.edu writes:

[…]

  I also got that working such that it could read the response and
  break out all the CSV variables in to separate strings. In other
  words, it does work and with gdb, one can trouble-shoot it fairly
  easily.

[…]

  In the standard set of tools that are free and found on most Unix
  systems, which language such as perl, python, etc can handle rS-232
  gracefully and do strings without having to reen vent the wheel?

[…]

  If I can do all of this within one language, including the RS-232
  coms, that will be great.

In Unix-like systems, including GNU/Linux, there isn't really
any difference between using a regular file, pipe, virtual
terminal, or a serial port.  Most of the time, one just does it,
and it works.

E. g., if I'd have to read a line from COM1, I could do it
easily in, say, Bash:

$ read x  /dev/ttyS0 
$ printf %s\\n $x
Hello, world!
$ 

(Assuming there's some device attached that sends “Hello,
world!” just at the right moment.)

There're a few things that may require explicit attention.
First of all, I'm almost certain that it will be necessary to
set the serial port to a particular mode (like: bit rate,
bitness, parity.)  I guess that many languages have support for
it (including a wrapper for the ioctl(2) system call, which, I
guess, you're familiar with.)

However, it's not /necessary/ to set the serial port's mode in
your own program.  Instead, you may set it with stty(1), once,
and then just run the program.  It's almost exactly what happens
if you'll use a “classic” serial terminal, or a modem and a
machine running a terminal emulator.

Second, the device may be using a newline sequence different to
that of the system, and it may be a bit tricky to set up the
language chosen to interpret it properly.

Also, it will really be nice to implement serial device locking
(I'm familiar with the UUCP locking scheme, but I vaguely recall
that it was to be deprecated; hopefully no misunderstanding on
my part.)  That way, only one of the programs trying to
simultaneously use the port will succeed, while the others will
fail with a nice error message.

That being said, my personal preference for that kind of task
would be Perl.  I guess that the points above could be resolved
by searching the CPAN archives [1].

[1] http://search.cpan.org/

PS.  I'm still interested in serial ports, partly due to having a live
UUCP link, and partly due to having some interest in embedded
systems' development, so I guess I'd be able to answer a few
more questions on them in this list (though it's a bit OT.)

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/86fwkies34@gray.siamics.net



Re: Why s port 111 still open?

2011-08-29 Thread Ivan Shmakov
 Jochen Spieker m...@well-adjusted.de writes:
 Lisi:

[…]

  lisi@Tux:~$ find rpcbind
  find: `rpcbind': No such file or directory

  This command doesn't do what you expect.  It prints all files found
  in the directory rcpbind in your current working directory.  Since
  no such directory exists, find exits with the error message above.

I guess that $ dpkg -S rpcbind ; would be more appropriate.

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/86vctgflt5@gray.siamics.net



Re: Why s port 111 still open?

2011-08-29 Thread Ivan Shmakov
 Lisi  lisi.re...@gmail.com writes:
 On Monday 29 August 2011 15:29:41 shawn wilson wrote:

  Your issue seems to be resolved. However, I'd prefer to teach a man
  to fish As it were, lsof -i :111 should show you the pid of what
  is on that port. From there, ps and then look through logs or 'find
  /etc/unit.d -type f -print0 | xargs -0 -i{} grep p name {}'
  sometimes works. But if you don't see am unit service, chances are
  its tcp wrapper / portmap. FWIW

  So the fact that nmap says that 111 is open for rpcbind does not mean
  that it is open for rpcbind??

For the sake of simplicity, let me explain that as follows:
nmap(1) says about port 111 being available for the rpcbind
/protocol/.  This protocol is implemented by /both/ portmap
/and/ rpcbind.

Another example of this sort you've already seen is:

$ nmap -6 ::1 | grep -F 80/tcp 
80/tcp  open  http
$ 

However, the machine the command above was run on has /no/
“http” installed:

$ dpkg -l http 
No packages found matching http.
$ 

(It has apache2-mpm-prefork installed, though.)

[…]

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/86ippgfb9c@gray.siamics.net



Re: Why s port 111 still open?

2011-08-29 Thread Ivan Shmakov
 shawn wilson ag4ve...@gmail.com writes:

[…]

  root@shawn-desktop:/home/shawn# find /etc/init.d/ -type f -print0 |
  xargs -0 -i{} grep -H portmap {}

As a news:comp.unix.shell regular, I simply cannot leave such a
command line in its present state.

First of all, {} is not necessary, but -- may be, as well as -F
to grep(1), in some circumstances, so:

$ find /etc/init.d/ -type f -print0 |
  xargs -0 -- grep -HF -- portmap 

Then, find(1) has -exec, so:

$ find /etc/init.d/ -type f -exec grep -HF -- portmap {} + 

This is both shorter and more efficient.

[…]

  if someone has a better method for finding what is running services,
  i'm all ears. i've gotten pretty good at tracking these down but have
  often thought there's got to be a better way :)

I'd do it as follows:

• # netstat -p (as root) to get the PID;

• $ readlink /proc/PID/exe (will work as an unprivileged user)
  to find the executable;

• $ dpkg -S /usr/bin/executable (as user, too) to find the
  package.

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/867h5wf534@gray.siamics.net



Re: free software accessibility

2011-08-28 Thread Ivan Shmakov
 Scott Ferguson prettyfly.producti...@gmail.com writes:
 On 27/08/11 15:53, Ivan Shmakov wrote:
 Scott Ferguson prettyfly.producti...@gmail.com writes:
 On 27/08/11 13:57, Ivan Shmakov wrote:

  [Cross-posting to both sfd-discuss@ and planning-ru@.]

[…]

  Our team would probably have joined the deal, but, unfortunately,
  we don't apparently have anything to offer to the sight impaired
  at our disposal

  Apart from your eyes!

Good point.  Thanks.

  eg. help identifying hardware at an installfest.

We weren't planning one, AFAIK.

It was in our plans to prepare Debian Live images to be written
on USB Flash drives to anyone interested in trying Debian.  And
to have a display room running Debian Live as well.

[…]

  Well, that's certainly something to offer.  However, I doubt that
  there would be enough (or even any) developers interested in that in
  our locality.

  You could give away DVDs, though it's running late to apply for
  funding, it's probably still possible.

We could probably burn some DVD+R's on our own, I guess.

[…]

  If you approach your local disability support groups you'll probably
  get plenty of suggestions - and if you can help with
  transport/directions they *will* come.

ACK.  Thanks.

(Actually, I don't even know how many are there computer users
among the sight impaired persons in our locality.  Hopefully
we'd manage to find someone to help us on that matter.)

  If you were interested in doing that - these links might be useful in
  finding ways to advertise your events (and find helpers):-

  http://mnadamovfund.org/
  http://www.icevi-europe.org/national/ru.html
  http://www.sibdisnet.ru/

(There should be a library of the all-Russian Blinds' Society in
our locality.  Probably we should start from there.)

[…]

  Festival and espeak do - I don't know how well though

  ACK.  I'd try to check it out.

  Any particular examples of software these could be used with?

  With KDE - everything.

Personally, I'm not familiar with either KDE or Gnome, and've
last experimented with them nearly a decade ago.

Honestly, I don't quite grasp the DE concept, and I've decided
that such a software increases both the eye-strain and CPU load
for no apparent gain for me.

I guess that there're some KDE (Gnome) users among the
organizers, but I'd like to check for other solutions just as
well.  (Somehow, I believe that speech synthesizers are usable
without any DE or GUI altogether.  But I'm open to hear any
success or failure stories on that part.)

[…]

  (ваша оценка может измениться)

  Is that YMMV as translated by Google?

  Yes. Let's blame Google.  Stupid Google! ;-p

To paraphrase an old saying, “never teach translation to a
machine, for you're likely to fail, and will annoy both the
machine and its users.”

  Funny enough, but it reads rather like Your Mileage May Change.
  (“May vary” would be “может отличаться” in Russian in this case.)

  vary - differ?

Yes.  And “Mileage” would be “километраж” literally.  (Almost;
sans the difference between Metric and Imperial units.)

[…]

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/86zkiughy8@gray.siamics.net



Re: A Question about Journalling File Systems and Flash Drives

2011-08-27 Thread Ivan Shmakov
 Scott Ferguson prettyfly.producti...@gmail.com writes:

[…]

  Full backups:-

  dd if=/dev/deb_usb | gzip -1 -c  ./deb_usb.img.gz

  Full restores:-

  zcat ./deb_usb.img.gz | dd of=/dev/deb_usb

My e2dis suite, which I hopeful to release soon, will probably
be a better fit for such image-level backups.  Namely, it'd
allow one to identify the free blocks on an Ext2+ FS and only
copy the rest.

https://gitorious.org/e2dis

  rsync on a daily basis.

I'd second that using rsync(1) instead of cp(1) when copying to
flash media is a good idea, as it reduces both wear and the time
necessary to make a copy.

[…]

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/86r546izz6@gray.siamics.net



Re: Is there a way to tell when a system was first booted?

2011-08-27 Thread Ivan Shmakov
 shawn wilson ag4ve...@gmail.com writes:
 On Sat, Aug 27, 2011 at 11:43, John A. Sullivan III wrote:
 On Sun, 2011-08-28 at 00:36 +1000, yudi v wrote:

  Is there a way to tell when a system was first booted?

  Does uptime do what you want or do you mean booted for the truly
  very first time (not counting reboots)?

  cat /proc/uptime

How's that more legible than the output of the uptime(1)
command?

$ cat  /proc/uptime 
44547837.32 177282465.98
$ uptime 
 17:24:43 up 515 days, 14:24,  3 users,  load average: 0.00, 0.00, 0.00
$ 

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/86mxeuix6f@gray.siamics.net



Re: Is there a way to tell when a system was first booted?

2011-08-27 Thread Ivan Shmakov
 shawn wilson ag4ve...@gmail.com writes:
 On Aug 27, 2011 1:26 PM, Ivan Shmakov i...@gray.siamics.net wrote:
 shawn wilson ag4ve...@gmail.com writes:
 On Sat, Aug 27, 2011 at 11:43, John A. Sullivan III wrote:

[…]

  Does uptime do what you want or do you mean booted for the truly
  very first time (not counting reboots)?

  cat /proc/uptime

  How's that more legible than the output of the uptime(1)
  command?

[…]

  Nothing.  Iirc uptime parses that file.

That's correct.

$ strace uptime 21 | grep -F /proc/ 
open(/proc/version, O_RDONLY) = 4
open(/proc/stat, O_RDONLY|O_CLOEXEC)  = 4
open(/proc/uptime, O_RDONLY)  = 4
open(/proc/loadavg, O_RDONLY) = 5
$ 

  For a history of boots, other than a BIOS log, you might look at the
  acct package, specifically what gets stored in wtmp.

I don't see how such a wtmp(5) maintenance is tied to the acct
package.  Consider, e. g.:

$ dpkg -l acct 
No packages found matching acct.
$ last reboot 
reboot   system boot  2.6. Tue Mar 30 03:11 - 18:06 (515+14:55) 
reboot   system boot  2.6. Tue Mar 30 03:10 - 03:11  (00:01)
reboot   system boot  2.6. Tue Mar 30 02:55 - 03:09  (00:13)

wtmp begins Tue Mar 30 02:55:59 2010
$ 

It was my guess that the reboot records are made by init(8).

  This would not give you anything prior to wtmp being created but
  might give you what you want.

Unfortunately, this file is logrotate(8)'d every month, and only
one backup survives as per the default configuration.

--cut: /etc/logrotate.conf --
# no packages own wtmp, or btmp -- we'll rotate them here
/var/log/wtmp {
missingok
monthly
create 0664 root utmp
rotate 1
}
--cut: /etc/logrotate.conf --

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/86ippiiux8@gray.siamics.net



free software accessibility

2011-08-26 Thread Ivan Shmakov
 Scott Ferguson prettyfly.producti...@gmail.com writes:

[Cross-posting to both sfd-discuss@ and planning-ru@.]

[…]

  GNU/Linux provides superior alternatives to JAWS - the only reason
  more sight impaired people don't ditch MS is because they don't hear
  about it - and because they get stupid advice (you need to learn
  things - learning shouldn't be necessary).

I wonder, could the upcoming Software Freedom Day be a kind of
opportunity to spread the word of Free Software to them?

Our team would probably have joined the deal, but,
unfortunately, we don't apparently have anything to offer to the
sight impaired at our disposal (no embossers, no Braille
terminals, and I don't even know if the speech synthesizers
provided with Debian support Russian.)

[To the Russian teams: or do we have anything of this sort,
actually?]

[…]

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


--
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/86sjonjykc.fsf...@gray.siamics.net



Re: free software accessibility

2011-08-26 Thread Ivan Shmakov
 Scott Ferguson prettyfly.producti...@gmail.com writes:
 On 27/08/11 13:57, Ivan Shmakov wrote:

  [Cross-posting to both sfd-discuss@ and planning-ru@.]

[…]

  Our team would probably have joined the deal, but, unfortunately, we
  don't apparently have anything to offer to the sight impaired at our
  disposal

  I'd argue that you do, and have.  Debian and w3 make it easier for
  developers to build to standards.  The community helps developers
  make apps useable.  Without those things assistive technology is just
  a cart waiting on a horse.

Well, that's certainly something to offer.  However, I doubt
that there would be enough (or even any) developers interested
in that in our locality.

  (no embossers, no Braille terminals, and I don't even know if the
  speech synthesizers provided with Debian support Russian.)

  Festival and espeak do - I don't know how well though

ACK.  I'd try to check it out.

Any particular examples of software these could be used with?

[You should've kept To: planning-ru@, BTW.]

  (ваша оценка может измениться)

Is that YMMV as translated by Google?  Funny enough, but it
reads rather like Your Mileage May Change.  (“May vary” would be
“может отличаться” in Russian in this case.)

[…]

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/86fwknjt74@gray.siamics.net



Re: LVM question: what's the difference between /dev/mapper/vg-lv and /dev/vg/lv

2011-08-23 Thread Ivan Shmakov
 yudi v yudi@gmail.com writes:

  I created a LV and was going to use the following command to create a
  file system:

  mkfs.ext4 /dev/vg/lv

  someone suggested I use:

  mkfs.ext4 /dev/mapper/vg-lv

  What's the difference?

There should be none.

Note, however, that /dev/mapper/ may contain non-LVM specials as
well, such as cryptsetup(8) ones.

My guess is that /dev/VG/LV may provide some sort of backwards
compatibility, as LVM may have been implemented before Linux's
“device mapper.”  (IIRC, there was an LVM implementation for
HP-UX, bearing some similarity to the one currently in Linux.)

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/86ippoqgvs@gray.siamics.net



Re: Cron script output redirection not working

2011-08-22 Thread Ivan Shmakov
 David  wizza...@gmail.com writes:

  This is something that used to work for me in older Debian releases
  (Etch and Lenny I think), but it's no longer working for me in
  Squeeze.

  Basically, I have a cron stub under /etc/cron.d, with a line like
  this:

  *  * * * * rootcd /tmp/  ./test.sh  ./test.log

[…]

  However, the log file /tmp/test.log is never created.

  Is it no longer possible to do output redirection to log files from
  within crontab scripts? Or am I meant to use a different syntax these
  days?

I guess that it may be related to the recent switch from Bash to
Dash as /bin/sh, which doesn't seem to support .

If that's true, then changing it to, e. g.,  ./test.log 21
will probably solve the problem.

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/86vctpsrb2@gray.siamics.net



SSH server

2011-08-20 Thread Ivan Shmakov
 Bob Proulx b...@proulx.com writes:
 RiverWind wrote:

  I used to be able to ssh from my shellworld account into my Linux
  box before I got the latest version of the squeeze disk. I am not
  able to do so now. Exactly what needs to be set up or in place in
  order for me to once again be able to access my Linux box via ssh
  or telnet from another site?

[…]

  2. Ensure that sshd is listening on port 22.

  $ netstat -na | grep '0.0.0.0:22'
  tcp0  0 0.0.0.0:22  0.0.0.0:*LISTEN

As IPv6 is slowly conquering the world, I'd be checking for
:::22 just as well, e. g.:

$ netstat -na | grep -F :::22 
tcp6   0  0 :::22   :::*LISTEN 
tcp6   0  0 2001:db8:1::1:51537 2001:db8:2::2:22ESTABLISHED
$ 

Also, neither . nor : are the characters that an ordinary shell
would treat as special, so single quotes aren't necessary.
OTOH, grep(1) will treat . as any character, not period, thus -F
should be used.  Consider, e. g.:

$ printf %s\\n 0.0.0.0:22 1020:030:22 | grep '0.0.0.0:22' 
0.0.0.0:22
1020:030:22
$ printf %s\\n 0.0.0.0:22 1020:030:22 | grep -F 0.0.0.0:22 
0.0.0.0:22
$ 

  3. Ensure that you can connect to the sshd port from the local host.
  Do this on the local host.

  $ telnet localhost 22
  ...
  Escape character is '^]'.
  SSH-2.0-OpenSSH_5.8p1 Debian-7
  ^]-- Use Control-] to escape
  telnet quit  -- Then type quit to exit

The Telnet protocol isn't the same as “no protocol.”  In
particular, IIRC, Telnet treats a \xff code as special.  For
network diagnostics, netcat (as of either netcat6,
netcat-openbsd, or netcat-traditional package) is generally
better.

And it can be interrupted by a plain ^C (C-c), BTW.

[…]

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/86mxf3tlrn.fsf...@gray.siamics.net



Re: How to read .so lib file

2011-08-18 Thread Ivan Shmakov
 lina  lina.lastn...@gmail.com writes:

  I don't know how to read the .so file under /usr/lib/

  the Binary file.

That depends on the purpose.

In particular, ldd(1) shows .so's dependencies, nm(1) shows the
names' to addresses correspondence (for functions, global
variables, etc.), strings(1) shows strings embedded within such
a file, etc.

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/86ty9evc15@gray.siamics.net



Re: Which keyserver to use for debian?

2011-08-17 Thread Ivan Shmakov
 Kent West we...@acu.edu writes:

  I'm getting the public key is not available type error on trying to
  upgrade my box from lenny to squeeze.

Could you please provide the whole error message?

Also, what's the output of the following commands:

$ dpkg -l debian-archive-keyring 

$ gpg --primary-keyring=/usr/share/keyrings/debian-archive-keyring.gpg \
  -k 55BE302B 

Please note that (as per [1]), the latest version of the
debian-archive-keyring package in Debian Lenny is
2010.08.28~lenny1.  I guess that upgrading it may result in the
issue going away.

[1] http://packages.debian.org/lenny/debian-archive-keyring

[…]

  gpg --keyserver subkeys.pgp.net --recv-keys 55BE302B

[…]

  So, how do I know subkeys.pgp.net is a safe keyserver?

The short answer is: you don't.  Moreover, you cannot even be
sure that the command above talks to that server, as the
administrators of the DNS server you use may have spoofed that
FQDN.  Or, a fellow on the same LAN may have spoofed the DNS
server's reply.  Or, the administrator of the router (as per the
“gateway” parameter in the interfaces(5)) may have redirected
the traffic going to the respective IP(s) to go to his or her
own keyserver.  And so on.

That's the whole purpose of public key cryptography here: once
the trusted key for the archive is known (and it gets known to
the system duiring the installation), one can safely install the
packages signed by that key, /including/ the package that
contains the trusted keys themselves.

  Or is there an official keyserver for debian users?

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/86ty9gxb0j@gray.siamics.net



Re: how to examine ssh problem

2011-08-17 Thread Ivan Shmakov
 Alan Chandler a...@chandlerfamily.org.uk writes:
 On 04/08/11 09:15, Ivan Shmakov wrote:
 Alan Chandler a...@chandlerfamily.org.uk  writes:

  (I actually have loads of these in my config file for all different
  combinations of username and host - I also tend to make different
  key pairs for each host which is why I am specifying an
  IdentityFile in each.)

  Why?  The asymmetric cryptography employed by SSH is there precisely
  to /not/ have multiple “secrets” on the side of the party being
  authenticated.

  Two things

  1) Legacy through a desire to limit issues when I was carrying around
  the private key on a laptop,

  2) Lack of thinking things through on my part.

  What I should really do is consolidate down to one key for my static
  desktop and another key I am prepared to dispose of if the device its
  in gets lost.

Well, I didn't say that I use a single key, either.  Actually,
there're a few hosts that I may be starting the SSH client on,
and so each of them gets a key.

It was the key per /target/ host part that made me wonder.

  I like to have a private key with no pass phrase to use within the
  privacy of my own home.  Obviously anything mobile needs a pass phrase
  to protect it.

Yes.

-- 
FSF associate member #7257  Coming soon: Software Freedom Day
http://mail.sf-day.org/lists/listinfo/ planning-ru (ru), sfd-discuss (en)


-- 
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/864o1fxqlu@gray.siamics.net



Re: Transplanting old System to New Drive

2011-08-16 Thread Ivan Shmakov
 Rob Owens row...@ptd.net writes:
 On Mon, Aug 15, 2011 at 06:12:24PM +0700, Ivan Shmakov wrote:
 Martin McCormick mar...@x.it.okstate.edu writes:
 Ivan Shmakov writes:

  It's possible to dd(1) just the filesystem (partition) instead of
  the whole disk.

  Moreover, the filesystem can be downsized prior to that with
  resize2fs(8), thus the destination partition may be smaller than
  the source one.

  What if the destination is larger which is the case, here?

  If the destination partition is larger than the source one, use
  resize2fs(8) after dd(1) on the destination partition — it'll make
  the additional space available to the filesystem.

  I think you need to use fdisk or something similar to enlarge the
  partition first.  Then resize the filesystem.

I've stated above that it isn't necessary to use dd(1) on the
whole disk image.

Obviously, when copying partition-to-partition, the destination
should already have a partition table, which, as I've deduced
from the question, has larger partition(s) than the source.

Regarding fdisk(8), I see little sense in using the old MBR
partition table nowadays (unless for compatibility with certain
BIOS'es, and then there's gptsync(8).)  And of free GPT
manipulation tools I'm aware only of GNU Parted.

(CHS addressing is quite nonsensical these days, anyway.)

-- 
FSF associate member #7257


-- 
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/86k4ad513b@gray.siamics.net



Re: Transplanting old System to New Drive

2011-08-15 Thread Ivan Shmakov
 Martin McCormick mar...@x.it.okstate.edu writes:
 Ivan Shmakov writes:

  It's possible to dd(1) just the filesystem (partition) instead of
  the whole disk.

  Moreover, the filesystem can be downsized prior to that with
  resize2fs(8), thus the destination partition may be smaller than the
  source one.

  What if the destination is larger which is the case, here?

If the destination partition is larger than the source one, use
resize2fs(8) after dd(1) on the destination partition — it'll
make the additional space available to the filesystem.

  Thanks for all the additional information.

-- 
FSF associate member #7257


-- 
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/86vctz3p47@gray.siamics.net



Re: /etc/inittab not executed upon starting X with startx command

2011-08-15 Thread Ivan Shmakov
 Tech Geek techgeek12...@gmail.com writes:

[…]

  However, I want to do a auto login into my fluxbox (instead of user
  typing in username and password in xdm) and I still want the basic
  login console on Serial Port 1. So I removed xdm package (apt-get
  purge xdm) and added the following line to my /etc/rc.local:

  su - user -c startx

  Now my system does the autologin into fluxbox but I no longer get my
  login console on Serial Port 1.

I guess that the inittab(5) entry in question is only started
after rc.local finishes.  Therefore, starting startx(1) in the
background may help.

[…]

-- 
FSF associate member #7257


-- 
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/86r54m4ivc@gray.siamics.net



Re: [OT] Google search default lang.

2011-08-14 Thread Ivan Shmakov
 Scott Ferguson prettyfly.producti...@gmail.com writes:

[…]

  To the best of my knowledge Google use geolocation to rank the
  physical location of servers in the search results - but *not*
  language. Default language is determined by your choice of Iceweasel
  language packs, then by system language settings.

… And, sometimes, the browser's own language settings, which are
used to generate the Accept-Language: HTTP/1.1 header contents.

The situation is like the following here.

If I use http://ipv6.google.com/ (which, I assume, is always
served by the US Google servers), then the “Preferred document
language” Lynx option takes effect.  (Examples are MIME'd.)

However, if I use http://www.google.com/ /and/ my preferred
document language is set to “en” (sic.), I get redirected to
http://www.google.ru/ instantly, which is in Russian!

I guess that it was made since the “majority” of users just
cannot be relied upon to configure their browsers properly.
Thus, Accept-Language: en is interpreted as a consuquence of
ignorance, not intent.

[…]

-- 
FSF associate member #7257  [np. Symphony Number 9 — Beethoven — PBO]
  Preferred document language  : en ru

--cut: http://ipv6.google.com/ --
   Web Images Videos Maps News Shopping Gmail more »
   iGoogle | Settings | Sign in

   Google
--cut: http://ipv6.google.com/ --

  Preferred document language  : ru en

--cut: http://ipv6.google.com/ --
   Веб Картинки Видео Карты Новости Переводчик Gmail ещё »
   Моя страница iGoogle | Настройки | Войти

   на русском
--cut: http://ipv6.google.com/ --

  Preferred document language  : de en ru

--cut: http://ipv6.google.com/ --
   Web Bilder Videos Maps News Shopping Google Mail Mehr »
   iGoogle | Einstellungen | Anmelden

   Deutsch
--cut: http://ipv6.google.com/ --


Re: [Slightly OT] Releasing swap space?

2011-08-14 Thread Ivan Shmakov
 AG  computing.acco...@googlemail.com writes:

  Just a quick query about releasing swap space.  On occasion according to
  Conky (system monitoring app), the swap space (set at 3Gb) sometimes
  gets used to up to 15% especially if using something like Pan for
  usenet.

  Is there any value/ harm in releasing this space using something like:

  swapoff -a  swapon -a [1]

Without the context, I see neither harm nor value in doing that.

However, if there was some task which used a lot of virtual
memory, thus forcing the other tasks' pages to be moved to swap,
doing that will bring those pages back to RAM, which may improve
the future responsiveness of the system.  (Up to the time when
such a memory-hungry task is run again; say, a Web browser with
a few dozens of graphically-rich pages in the tabs.)

  Thanks for your opinions.

  [1] found on the web, but not AFAIK Debian specific

-- 
FSF associate member #7257


-- 
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/861uwo6rpc@gray.siamics.net



Re: [Slightly OT] Releasing swap space?

2011-08-14 Thread Ivan Shmakov
 AG  computing.acco...@googlemail.com writes:
 On 14/08/11 14:35, Ivan Shmakov wrote:
 AG  computing.acco...@googlemail.com writes:

[…]

  I have recently switched to Xfce4 on Stable from Gnome because the
  latter was quite a memory hog and seemed to retain pages in swap
  until I logged/ rebooted.

The pages that stay longer in the swap are the pages that are
used less frequently.

  Xfce4 fortunately doesn't do this, but I did notice that after using
  Swiftfox I was finding that 3% usage of swap didn't clear when I
  closed the app.

These are likely to be the pages belonging to some “sleeping”
processes.

  This set me to wondering how much control I could exert and even
  should exert over swap's content.

  Are you able to confirm whether the code given previously is accurate
  *and* safe should I want to pursue clearing swap on the fly?

The code in question is only safe if there's enough free RAM to
load all the swapped pages into.

Otherwise, OOM madness may ensue.

-- 
FSF associate member #7257


-- 
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/86liuw5744@gray.siamics.net



Re: [Slightly OT] Releasing swap space?

2011-08-14 Thread Ivan Shmakov
 Camaleón  noela...@gmail.com writes:

[…]

  So, who is going to say that a /swap partition is going to be
  needed with 8 GiB of RAM?  I wouldn't, I just thought kernel makes
  use of all of the available resources are allocates them to get the
  best performance.  Meaning: if you have available resources (i.e.,
  unused swap) they will be used.

When preparing some files to be written to a DVD+R, I'd usually
put them to /tmp/.  The total volume of the files in such a case
may easily exceed the amount of the physical RAM I have on the
host, so the swap gets used.

IOW, I consider swap to be not only the disk space that gets
used in the case there's insufficient physical RAM, but also the
space that I can easily use for temporary files.

Therefore, it's my preference, and everlasting recommendation,
to have about 3% of the disk space allocated for swap.

-- 
FSF associate member #7257


-- 
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/86hb5k56mw@gray.siamics.net



Re: Rsync -- Different Outputs on No Transfer

2011-08-14 Thread Ivan Shmakov
 Hal Vaughan h...@halblog.com writes:

[…]

  It's not a must fix but when I'm scanning output files, obviously
  it's a LOT easier to verify everything went smoothly if I get a quick
  and simple output than if I have to scan a long list of directories.

  It'd be nice to simplify it so I can tell at a glance when things
  went well.  Any suggestions on what could cause the difference?

My guess is that using -O along with -t may reduce the number of
directories in the -v list.

-- 
FSF associate member #7257


-- 
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/86d3g75sv6@gray.siamics.net



Re: Rsync -- Different Outputs on No Transfer

2011-08-14 Thread Ivan Shmakov
 Hal Vaughan h...@halblog.com writes:
 On Aug 14, 2011, at 10:08 PM, Ivan Shmakov wrote:

[…]

  My guess is that using -O along with -t may reduce the number of
  directories in the -v list.

  Thanks.  I tried with -O and without it, along with -t and no -t (in
  other words all four combinations of those two), but I still get the
  directory listing.

What kind of filesystem is used on both sides of Rsync there?

My other guess would be that one of the filesystems has better
timestamp accuracy, therefore requiring --modify-window=.  Or,
one can always use -c, though it may get much more CPU
intensive, and thus slower.

-- 
FSF associate member #7257


-- 
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/868vqv5ovd@gray.siamics.net



Re: Transplanting old System to New Drive

2011-08-14 Thread Ivan Shmakov
 Martin McCormick mar...@x.it.okstate.edu writes:

[…]

  If I use dd to copy the 10-gig drive over to the new drive as in:

  dd if=/dev/hda of=/dev/hdb bs=20M

  it works when I remove the old screamer drive, change the jumper on
  the new drive to Master and boot but this is not very efficient as it
  wastes almost 6 gigs of drive.

It's possible to dd(1) just the filesystem (partition) instead
of the whole disk.

Moreover, the filesystem can be downsized prior to that with
resize2fs(8), thus the destination partition may be smaller than
the source one.

Or, the destination may be created with the same size, dd(1) is
performed, the filesystem (on destination) downsized, and then
the destination partition downsized as well.

Also, I'd recommend using GPT on the destination, even if the
source uses MBR.  (Using gptsync(8) if BIOS lacks support for
GPT.)

[…]

-- 
FSF associate member #7257


-- 
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/864o1j5ogw@gray.siamics.net



Re: LVM write performance

2011-08-13 Thread Ivan Shmakov
 Stan Hoeppner s...@hardwarefreak.com writes:

[…]

  The horrible performance with bs=512 is likely due to the LVM block
  size being 4096, and forcing block writes that are 1/8th normal size,
  causing lots of merging.  If you divide 120MB/s by 8 you get 15MB/s,
  which IIRC from your original post, is approximately the write
  performance you were seeing, which was 19MB/s.

I'm not an expert in that matter either, but I don't seem to
recall that LVM uses any “blocks”, other than, of course, the
LVM “extents.”

What's more important in my opinion is that 4096 is exactly the
platform's page size.

--cut: vgcreate(8) --
   -s, --physicalextentsize PhysicalExtentSize[kKmMgGtT]
  Sets the physical extent size on physical volumes of this volume
  group.  A size suffix (k for kilobytes up to t for terabytes) is
  optional, megabytes is the default if no suffix is present.  The
  default is 4 MB and it must be at least 1 KB and a power of 2.
--cut: vgcreate(8) --

[…]

-- 
FSF associate member #7257


-- 
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/864o1l8j5c@gray.siamics.net



autoinstalled packages

2011-08-12 Thread Ivan Shmakov
 Sven Joachim svenj...@gmx.de writes:
 On 2011-08-12 15:51 +0200, Bonno Bloksma wrote:

[…]

  When I want to remove the dummy dhcp3 package, the real isc package also
  gets removed.

  This is general problem with dummy transitional packages.  The
  package they pull in gets marked as automatically installed, and
  when you remove the dummy package, its dependency gets autoremoved.
  Nobody has a good solution to this yet, AFAIK.

[…]

  aptitude unmarkauto isc-dhcp-client does the trick.

I guess that # apt-get install isc-dhcp-client may do the same
(provided that there's no newer version of the package in the
repositories.)

Also there's the APT::Get::AutomaticRemove option, which, if set
to false, I expect to prevent APT from removing the
automatically installed packages.

However, what I'm interested in right now, is how do I access
the list of autoinstalled packages with plain APT or dpkg(1)?

-- 
FSF associate member #7257


-- 
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/86aabeabzk.fsf...@gray.siamics.net



Re: autoinstalled packages

2011-08-12 Thread Ivan Shmakov
 Scott Ferguson prettyfly.producti...@gmail.com writes:
 On 13/08/11 01:25, Ivan Shmakov wrote:
 Sven Joachim svenj...@gmx.de writes:

[…]

  Also there's the APT::Get::AutomaticRemove option, which, if set
  to false, I expect to prevent APT from removing the
  automatically installed packages.

  I'm not sure that works the way you expect - but I haven't had a
  chance to check.  My foggy memory is that it refuses to remove any
  packages if a package selected to be removed doesn't want to go
  alone.

I haven't checked it explicitly, but:

--cut: apt-get(8) --
   --auto-remove
   If the command is either install or remove, then this option
   acts like running autoremove command, removing the unused
   dependency packages.  Configuration Item:
   APT::Get::AutomaticRemove.
--cut: apt-get(8) --

[…]

  The package they pull in gets marked as automatically installed,

[…]

  However, what I'm interested in right now, is how do I access
  the list of autoinstalled packages with plain APT or dpkg(1)?

  I don't have any autoinstalled packages (whatever that means)

It was meant to mean “installed thanks to the dependencies”, as
opposed to “manually selected with # apt-get install PACKAGE.”
I believe that Sven (above) has used the term in the same way.

  on my system so I can't test.

  Try:-

  dpkg -l *dummy* | less

  OR

  dpkg -l *transitional* | less

The both are going to search for these keywords in the package
names, while I think that the Description:'s are more relevant
here.

[…]

  PS. This might do what you want:-

  # apt-get -s autoremove | less

Indeed it does.  Yet, this doesn't seem like a straightforward
way to obtain this list.  (Especially from a script.)  Moreover,
I'd like to be able to modify this list, too.

  If it then looks safe to proceed...:-

  # apt-get autoremove

-- 
FSF associate member #7257


-- 
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/86y5yy8ttl@gray.siamics.net



Re: autoinstalled packages

2011-08-12 Thread Ivan Shmakov
 Sven Joachim svenj...@gmx.de writes:
 On 2011-08-12 17:25 +0200, Ivan Shmakov wrote:
 Sven Joachim svenj...@gmx.de writes:

[…]

  Also there's the APT::Get::AutomaticRemove option, which, if set
  to false, I expect to prevent APT from removing the
  automatically installed packages.

  Well, apt-get and aptitude have different configuration keys and
  default values for them (apt-get defaults to not autoremove unused
  packages).  That's a bit unfortunate, but since aptitude had always
  defaulted to autoremove unused packages and apt versions before 0.7
  could not even mark packages as automatically installed, this is
  understandable.

To be honest, I cannot recall that I've ever used aptitude(8),
so I guess that I've just confused OP's aptitude(8) invocation
with apt-get(8).  My apologies for that.

  However, what I'm interested in right now, is how do I access
  the list of autoinstalled packages with plain APT or dpkg(1)?

  With apt, use apt-mark showauto.

ACK.  Thanks!

  With dpkg it's not possible since dpkg does not know about
  autoinstalled packages.

-- 
FSF associate member #7257


-- 
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/86ty9m8tdv@gray.siamics.net



Re: how to change root passwd (if forgotten)

2011-08-11 Thread Ivan Shmakov
 Francois Cerbelle franc...@cerbelle.net writes:
 Le Wed, 10 Aug 2011 18:10:02 +0200, Thierry Chatelet a écrit:
 On Wednesday 10 August 2011 17:53:26 Umarzuki Mochlis wrote:

  if i'm not mistaken you can just go to single user mode on centos
  by appending 1 or single (without quotes) on boot parameter, no
  need for any live cd

  Not with debian, but lots of trail if you google it.

  But init=/sbin/bash should work, then mount, modify, dont forget to
  umount everything and reboot

Instead of rebooting, one may exec the proper init(8) here,
like:

# exec /sbin/init 

-- 
FSF associate member #7257


-- 
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/86k4akb7gg@gray.siamics.net



Gmane (was: Re: Hdd recipes for preseeding d-i)

2011-08-11 Thread Ivan Shmakov
 Diederik de Haas didi.deb...@cknow.org writes:
 On Thursday 11 August 2011 14:26:39 Wawrzek Niewodniczanski wrote:

  You ask for help and ask people to do additional step to help you.
  Shouldn't you rather subscribe to the list?

  My time is limited and I've chosen to subscribe to other (lower
  volume) lists from which I expect to get more and/or it's more likely
  I can help others.

  Not that you don't have a point, but I've seen that please CC me
  line on a number of lists and it didn't bother me.

Please note that it's possible to use Gmane [1] to participate
in mailing list discussions without ever having anything dropped
into the mail box.

[1] http://gmane.org/

-- 
FSF associate member #7257


-- 
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/86y5yz9tdy.fsf...@gray.siamics.net



Re: how to change root passwd (if forgotten)

2011-08-11 Thread Ivan Shmakov
 Robert Blair Mason r...@verizon.net writes:
 On Thu, 11 Aug 2011 15:48:02 -0600

  sulogin is easy enough to bypass.

  * Boot Live CD
  * Mount /
  * Edit /etc/inittab
  * Comment out si::sysinit:/etc/init.d/rcS
  * Reboot into single user mode

  Much easer than chroots, or any of the other previous suggestion, IMO.

  Easier than:

  * Add init=/bin/bash to the end of kernel in grub
  * mount -o remount,rw /
  * passwd
  * sync  reboot

I'd rather recommend # umount -a instead of # sync here.

Then, to my experience, # exec /sbin/init is by no way inferior
to # reboot.

  ?  Most people I know would rather blindly type commands than edit a
  file, and I for one lose my Live CDs a lot :D

-- 
FSF associate member #7257


-- 
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/86sjp79t6i@gray.siamics.net



Re: bash quoting problems

2011-08-10 Thread Ivan Shmakov
 thomas kral thomas.k...@email.cz writes:

  I have a problem with the following sed snippet

  sed -i s|^\( *PATH=\)\(.*\)|\1$ADD:\2| ~/profile-test

  I need soft quotes in order for $ADD to expand and I also need to math
  against one doublequote in the regexp in for $ADD to be put in the
  corrct place. Does anyone know how to do this?

  You may want to consider putting the sed script in a file and using
  the -f script (or --file=script) option instead.

  No quoting needed. ;)

  BTW, since Squeeze default shell is dash, not bash

There's no difference in double quotes interpretation between
Bash and Dash (not any that I'm aware of, anyway.)

Also, the OP has explicitly stated which shell is used, and even
if /bin/sh is Dash in Debian, scripts having #!/bin/bash at the
top will still use Bash.

(Somehow I think that Bash is the default users' shell just as
well, BTW.)

-- 
FSF associate member #7257


-- 
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/86ipq5cxuj@gray.siamics.net



Re: how to change root passwd (if forgotten)

2011-08-10 Thread Ivan Shmakov
 abdelkader belahcene abelahc...@gmail.com writes:

[…]

  then I decided to remove passwd from /etc/shadow (delete the
  second field).

  OK, now I can access my machine without passwd, BUT I CAN´T GIVE ANY
  PASSWORD  I RECEIVE THIS ERROR

  # passwd*
  *Changing password for user root.
  New password:
  Retype new password:
  passwd: Authentication token manipulation error

  any idea to fix the problem.

Running pwck(8) may give one more information on the issue.

Then, I'd make a backup for shadow(5) and try to use pwconv(8)
to fix the inconsistencies reported by pwck(8).

  thanks a lot *

-- 
FSF associate member #7257


-- 
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/86y5z1b0ir@gray.siamics.net



Re: Problem with USB storage device - video glasses

2011-08-09 Thread Ivan Shmakov
 Bret Busby b...@busby.net writes:

[…]

  sdb: unknown partition table

What's the result of the following command?

$ file -s /dev/sdb

Is it possible to mount /dev/sdb manually?  E. g.:

$ sudo mount -v /dev/sdb /mnt/

What are the messages displayed by the command above?

[…]

-- 
FSF associate member #7257


-- 
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/861uwueciz@gray.siamics.net



Re: Problem with USB storage device - video glasses

2011-08-09 Thread Ivan Shmakov
 Bret Busby b...@busby.net writes:
 On Wed, 10 Aug 2011, Ivan Shmakov wrote:
 Bret Busby b...@busby.net writes:

  sdb: unknown partition table

  What's the result of the following command?

  $ file -s /dev/sdb

  
  file -s /dev/sdb
  /dev/sdb: data
  

That's strange, given the working mount(8) invocation below.

  Is it possible to mount /dev/sdb manually?  E. g.:

[…]

  Mounting manually, using that, worked.

  Thanks for that.

You may also want to check pmount(8) (of the pmount package.)

  I do not understand why it was not automatically mounted, like the
  other USB devices that I mentioned in the previous message.

I guess that it may be because the block device in question
lacks a partition table, and the automounting facility used
assumes that it should have one.

It may be possible to add a partition table to the device
(obviously destroying the contents), but it should be checked
whether the device itself supports writing to a filesystem on a
partition.

-- 
FSF associate member #7257


-- 
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/86wrelde56@gray.siamics.net



Re: bash quoting problems

2011-08-09 Thread Ivan Shmakov
 Andreas Berglund andreas.bergl...@home.se writes:

  I have a problem with the following sed snippet

  sed -i s|^\( *PATH=\)\(.*\)|\1$ADD:\2| ~/profile-test

  I need soft quotes in order for $ADD to expand and I also need to
  math against one doublequote in the regexp in for $ADD to be put in
  the corrct place.

The double quote character within Shell's double quotes can be
escaped with a backslash (“\”):

   sed -i s|^\( *PATH=\\)\(.*\)|\1${ADD}:\2| 

However, one is by no means forced to use just one kind of
quotes in Shell, so the following is also possible:

   sed -i 's|^\( *PATH=\)\(.*\)|\1'${ADD}':\2|' 

  Does anyone know how to do this?

The questions like this are much more likely to be answered by
the comp.unix.shell Usenet newsgroup folks.  The newsgroup could
be accessed either using some sort of newsreader software (Gnus,
Alpine, SLRN, Icedove/Thunderbird, etc.), e. g.:

news:comp.unix.shell
nntp://aioe.org/comp.unix.shell/

Or with a Web browser, e. g.:

http://www.webuse.net/frameset.php?ng=comp.unix.shell
http://groups.google.com/group/comp.unix.shell

-- 
FSF associate member #7257  [np. Cortége — Apocalyptica]


-- 
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/86sjp9ddil@gray.siamics.net



Re: how to examine ssh problem

2011-08-04 Thread Ivan Shmakov
 Alan Chandler a...@chandlerfamily.org.uk writes:

  (I actually have loads of these in my config file for all different
  combinations of username and host - I also tend to make different key
  pairs for each host which is why I am specifying an IdentityFile in
  each.)

Why?  The asymmetric cryptography employed by SSH is there
precisely to /not/ have multiple “secrets” on the side of the
party being authenticated.

The authentication systems based on symmetric cryptography (say,
Kerberos), indeed, require the authenticated party to have a
distinct shared secret for each of the “authentication realms”
(say, Kerberos realms) it belongs to

-- 
FSF associate member #7257


-- 
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/86mxfph9sn@gray.siamics.net



Re: which command I should use to output sequentially,

2011-07-27 Thread Ivan Shmakov
 lina  lina.lastn...@gmail.com writes:
 On Wed, Jul 27, 2011 at 1:36 PM, Ivan Shmakov wrote:

[…]

  $ sed -e 's/^\(\s*\w\+\s\+[^0-9[:blank:]]\+\)\([[:digit:]]\+\)/\1 \2/' \
   | sort -nk 3,3 -k1,1 \
   | sed -e 's/^\(\s*\w\+\s\+[^0-9[:blank:]]\+\)\s\([[:digit:]]\+\)/\1\2/'

  Thanks, but there is another problem here, about the first field,
  which I wish it can be consequentially (mainly keep it present
  sequential), Here is the list, a bit longer,

Somehow, I've had the -k options order reversed in the code
above.  It should've read: … | sort -n -k 1,1 -k 3,3 | …
instead.

Note that there we're sorting numerically on the first field,
too.  If that's undesirable, sort(1) is to be invoked twice,
like: … | sort -n -k 3,3 | sort -s -k 1,1 | ….

[…]

-- 
FSF associate member #7257


-- 
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/86hb68p86t@gray.siamics.net



Re: which command I should use to output sequentially,

2011-07-27 Thread Ivan Shmakov
 shawn wilson ag4ve...@gmail.com writes:

[…]

  Might I recommend a plethora of free database solutions available to
  you?  I see this type of question quite frequently and am stunned to
  see such a thing here (or on other mailing lists for platforms just a
  poorly suited for such data). I'm not sure what your data is from or
  what it is for but I almost guarantee you that it should be in a
  database. Either that or open LibraOffice calc and do the one off
  data task in a few minutes and be done with it.

While I've little to say about using a database for this case,
I'd strongly recommend /against/ using any office-like solutions
for data processing, as these are generally overweight and
rarely convenient when it comes to writing scripts.

  Either way, there's generally a right tool for the job and I highly
  doubt that bash, cut, tr, grep, sed, awk, etc are the hammers you
  really want to use for this nail.

Actually, I've seen these tools (along with, say, Gnuplot and
GNU M4) being successfully used to process various scientific
data.  (Not to mention that I've a first-hand experience with
this just as well.)

It may be not a perfect solution, but I'm quite certain it's one
of the best currently available ones.

-- 
FSF associate member #7257


-- 
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/868vrkp3qx@gray.siamics.net



Re: fstab for usb devices in Squeeze

2011-07-27 Thread Ivan Shmakov
 Mark Grieveson dg...@torfree.net writes:

  My fstab doesn't have any entries for usb disks.  I use fluxbox and
  I use pcmanfm (a file manager) to mount/unmount usb sticks.

  That's interesting.  A while back, when I tossed out gnome and gdm in
  favour of fluxbox and startx, I likely also removed automatic mounting
  processes in my computer.  So, I had to set up stuff to manually mount
  things, which resulted in the fstab entries I used to have.  That
  having changed in Squeeze has caused some issues -- IE, it seems the
  labelling of all drives became different.

While the labelling of IDE and SATA drives could be based on
controller's port numbers, it's impractical to do so for USB
Mass Storage devices (or should I say endpoints?), as there may
be a practically unlimited number of those on a single bus.

Therefore, the “dynamic” labelling becomes a must.

Then, one cannot be certain that a particular /dev/sdX device
cannot one day turn from being a USB stick to being a newly
added HDD, which is a security issue for a multi-user host.

  Anyway, to avoid having to look up the specific UUID each time I
  insert a new device, it may be useful for me to look into setting up
  some sort of automatic mounting utility (like installing pmount,
  maybe).

pmount(1) isn't about automatic mounting.  Rather, it's about
delivering a restricted mount(8)-capability to the users, which
is quite similar to the ‘user’ fstab(5) option.

However, while mount(8) only allows the filesystems explicitly
listed in fstab(5) to be mounted, pmount(1) allows any block
device to be mounted to any directory, provided that, roughly:

• the block device is owned by a specific group (e. g., floppy);

• the directory is a subdirectory of /media/, and isn't already
  a mount point for a filesystem.

-- 
FSF associate member #7257


-- 
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/864o28p273@gray.siamics.net



Re: which command I should use to output sequentially,

2011-07-27 Thread Ivan Shmakov
 shawn wilson ag4ve...@gmail.com writes:
 On Jul 27, 2011 3:44 AM, Ivan Shmakov i...@gray.siamics.net wrote:

[…]

  While I've little to say about using a database for this case, I'd
  strongly recommend /against/ using any office-like solutions for
  data processing, as these are generally overweight and rarely
  convenient when it comes to writing scripts.

  The point of writing a script / program is to have a reusable
  process.

Since the OP has mentioned a Shell command, I've assumed that
it's the case.

[…]

  Actually, I've seen these tools (along with, say, Gnuplot and GNU
  M4) being successfully used to process various scientific data.
  (Not to mention that I've a first-hand experience with this just as
  well.)

  It may be not a perfect solution, but I'm quite certain it's one of
  the best currently available ones.

  Never used m4 so can't comment specifically.

There, it's used to prepare Gnuplot command files out of the
templates.  It's not a necessity, but it was a bit more handy to
do it that way, rather than using, say:

… \
| sed -e s/@FOO@/${FOO}/g \
| … \
| gnuplot 

  However, I'd look at some of the bio perl modules if this was the
  type of data I was looking at.  Either way, learning dozens of tools
  to manipulate lots of data is quite time consuming, prone to failure,
  and quite frankly senseless.

How it's different to learning dozens of functions documented in
perlfunc(3)?  Or even more, should CPAN modules be taken into
account?  How could it be that the Shell commands do not form a
library, or a set of, of a sort?

[…]

-- 
FSF associate member #7257


-- 
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/86zkk0nn5q@gray.siamics.net



Shell vs. other high-level languages

2011-07-27 Thread Ivan Shmakov
 shawn wilson ag4ve...@gmail.com writes:
 On Jul 27, 2011 4:28 AM, Ivan Shmakov i...@gray.siamics.net wrote:
 shawn wilson ag4ve...@gmail.com writes:

  However, I'd look at some of the bio perl modules if this was the
  type of data I was looking at.  Either way, learning dozens of
  tools to manipulate lots of data is quite time consuming, prone to
  failure, and quite frankly senseless.

  How it's different to learning dozens of functions documented in
  perlfunc(3)?  Or even more, should CPAN modules be taken into
  account?  How could it be that the Shell commands do not form a
  library, or a set of, of a sort?

  Different commands use different switches

How it's different to different functions using different
arguments' order?

  and do the same thing (sed vs awk vs grep for tons of uses),

However, it's Perl that has “There's more than one way to do it”
as its motto.

  bash is slower.

There're, indeed, are the cases when it's observable.  There,
however, are the cases when it's not.  I would also argue that
the Shell commands implemented in a compiled language (say, C)
are somewhat more common than the Perl functions implemented
that way.

  And I find it easier for bad / different data to break a shell script
  (well I can technically stop most languages from earring with try /
  catch which is a plus but not the point) and verifying data in bash
  is a pita.

It depends more on a programmer's competence, than on the
language.

  Also, idk of any debug option in bash (perl -d, gdb, etc).

There's the -x (xtrace) Bash option, though it isn't comparable
to, say, GDB.

And I don't remember myself ever using Perl's debugger.

  However, this is not answering the op's question.  So, while I
  started this, I'll start a new thread if we wish to continue this
  (preferably with code examples :) ).  And I do hope you wish to
  continue this as I find the debate fun but way OT (per op question)
  at this point.

Actually, I don't feel that I'm in position to advocate the use
of Shell.  Also, this discussion is OT not only per the OP's
question, but also to this very mailing list.

I've already mentioned that news:comp.unix.shell has a few folks
that could provide much more insight on the questions above than
I possible could.  Therefore, I'd prefer continuing the thread
there.

-- 
FSF associate member #7257  [np. Jami Sieber — Unspoken]


-- 
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/86vcuonkwi.fsf...@gray.siamics.net



Re: which command I should use to output sequentially,

2011-07-27 Thread Ivan Shmakov
 lina  lina.lastn...@gmail.com writes:

[…]

  May I ask further, which is the best (systematic) way of learning the
  script, based on all your experience.

Personally, my own way of learning Shell was hardly a
“systematic” one.  However, just for the record, I've used the
GNU bash manual [1] as the primary source.  Also, Advanced
Bash-Scripting Guide [2] looks promising as an educational
resource.

[1] http://www.gnu.org/software/bash/manual/
[2] http://tldp.org/LDP/abs/html/

-- 
FSF associate member #7257


-- 
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/86mxg0njak@gray.siamics.net



Re: Generate OpenSSL CSR in Squeeze

2011-07-27 Thread Ivan Shmakov
 David A Parker dpar...@utica.edu writes:

  We have an RSA key with no encryption password, and we need to generate
  a CSR using this key.  However, when I try to generate a CSR, I get an
  error:

  # openssl req -new -key server.key -out server.csr
  Enter pass phrase for server.key:

I guess that openssl(1) somehow doesn't recognize the format of
the key file, thus thinking that it may be encrypted.

While I don't know what may cause this behavior, I'd try to use
GnuTLS' certtool(1) to generate the request, in the hope that
it's unlikely that both OpenSSL and GnuTLS would've been broken
in the same way.

$ openssl --generate-request --load-privkey=server.key --outfile=server.csr 

[…]

-- 
FSF associate member #7257


-- 
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/86wrf3n2fi@gray.siamics.net



Re: Routing weird IPs

2011-07-27 Thread Ivan Shmakov
 Paulo Santos paulo.r.san...@sapo.pt writes:

[…]

  Plus this routes:

  10.0.0.0 /255.0.0.0 - 10.120.43.158
  62.48.163.64/255.224.0.0 - 10.200.34.158
  192.168.168.0/255.255.255.192 - 10.120.43.158

The last one should probably be as follows instead:

   192.168.160.0/255.255.255.192 - 10.120.43.158

[…]

-- 
FSF associate member #7257


-- 
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/86sjprn28d@gray.siamics.net



Re: Routing weird IPs

2011-07-27 Thread Ivan Shmakov
 Paulo Santos paulo.r.san...@sapo.pt writes:
 Ivan Shmakov wrote:
 Paulo Santospaulo.r.san...@sapo.pt  writes:

  192.168.168.0/255.255.255.192 - 10.120.43.158

  The last one should probably be as follows instead:

  192.168.160.0/255.255.255.192 - 10.120.43.158

  Why is that?

  I tried it, though, but I get the same behaviour.

Apparently, my eye has slipped.  There's no issue with this
IP/netmask pair.  Rather, I see the issue with the other one:

  62.48.163.64/255.224.0.0 - 10.200.34.158

It's the convention to have the masked-out bits of a network IP
address to be zero.  And my guess is that route(8) may fail with
the following if this convention isn't followed:

  route: netmask doesn't match route address

In this case:

62.48.163.640010 0011 10100011 0100
255.224.0.0  1110  

So, it should've probably been as follows instead:

62.32.0.0/255.224.0.0

-- 
FSF associate member #7257


-- 
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/867h73maf4@gray.siamics.net



Re: Generate OpenSSL CSR in Squeeze

2011-07-27 Thread Ivan Shmakov
 David A Parker dpar...@utica.edu writes:
 On 07/27/2011 11:55 AM, Ivan Shmakov wrote:

[…]

  While I don't know what may cause this behavior, I'd try to use
  GnuTLS' certtool(1) to generate the request, in the hope that
  it's unlikely that both OpenSSL and GnuTLS would've been broken
  in the same way.

  $ openssl --generate-request --load-privkey=server.key --outfile=server.csr

s/openssl/certtool/.

  Thanks.  It turns out the key file in question is an encrypted key
  (not a plain RSA key as I thought).  However, it was created with no
  password specified, and apparently OpenSSL doesn't stop you from
  doing this, but it can't read the encrypted key later if you chose
  not to set a password.  A quick example:

  # openssl genrsa 4096 | openssl pkcs8 -topk8 -out test.key

[…]

Unfortunately, while it seems that certtool(1) allows an empty
password, the DES-CBC encryption schema is apparently
unsupported:

$ certtool -8 --generate-request --load-privkey test.key --outfile test.csr 
Generating a PKCS #10 certificate request...
Enter password: |1| PKCS encryption schema OID '1.2.840.113549.1.5.3' is 
unsupported.
certtool: importing --load-privkey: /tmp/test.key: The cipher type is 
unsupported.
$ 

Also, I've tried to specify an empty password to openssl(1) with
both -passin pass: and -passin file:/dev/null, but to no avail.

I see no solution other than generating a new private key with
-nocrypt, like:

$ openssl genrsa 4096 | openssl pkcs8 -nocrypt -topk8 -out test.key 

  And now you're stuck.  It just keeps asking for a password, and even
  ^C won't break out of this.  You have to enter a junk password that's
  more than 4 characters, and that will force it to fail and abort.

  I think this behavior is very odd.

Indeed.

-- 
FSF associate member #7257


-- 
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/86y5zjkumc@gray.siamics.net



Re: sound problem with lenny

2011-07-26 Thread Ivan Shmakov
 Long Wind longwind2...@gmail.com writes:

[…]

  I have made some progress If sound doesn't work commands below can
  config sound:

  rmmod snd-pcsp
  rmmod snd-sb16
  modprobe snd-sb16 isapnp=0

Is there a line like the following somewhere in
/etc/modprobe.d/?

options snd-sb16 isapnp=0

  What's wrong with lenny?

-- 
FSF associate member #7257


-- 
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/86tya8pbsd@gray.siamics.net



Re: disable fbcon in Debian Wheezy (Live)?

2011-07-26 Thread Ivan Shmakov
 Camaleón  noela...@gmail.com writes:
 On Mon, 25 Jul 2011 01:23:47 +0700, Ivan Shmakov wrote:
 Camaleón noela...@gmail.com writes:
 On Sun, 24 Jul 2011 18:23:54 +0700, Ivan Shmakov wrote:

[…]

  Otherwise, fbcon works pretty much correctly for the case in
  question.  As per lsmod, the driver is i915.

  Intel KMS requires fbcon, unless this has changed recently... and
  for Intel cards KMS is also mandatory, so I dunno what to suggest
  :-)

  What do you mean by “mandatory”?  I've ran the system without both
  the i915 module and fbcon, and had no problems with that setup so
  far.  In particular, X works correctly.

  I remember a problem with intel driver

The kernel's, or the X.org's one?

  and fbcon not being loaded that caused X to crash, but maybe this has
  already been corrected.

To state it explicitly: I haven't tested X with kernel's i915
and without fbcon — only X without /either/ of i915 and fbcon.

I hope to check whether the respective kernel modules can be
“blacklisted” via modprobe.conf(5) shortly.

--cut: /etc/modprobe.d/blacklist --
# This file lists modules which will not be loaded as the result of
# alias expansion, with the purpose of preventing the hotplug subsystem
# to load them. It does not affect autoloading of modules by the kernel.
# This file is provided by the udev package.
--cut: /etc/modprobe.d/blacklist --

(But I still wonder, is this the hotplug subsystem that loads
the modules in question, or is it the kernel?)

-- 
FSF associate member #7257


-- 
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/86pqkwpbcc@gray.siamics.net



Re: which command I should use to output sequentially,

2011-07-26 Thread Ivan Shmakov
 lina  lina.lastn...@gmail.com writes:

First of all, a kindly reminder: there's a news:comp.unix.shell
newsgroup (also available via Google Groups [1], though a proper
newsreader software is recommended), with a few truly
knowledgeable folks among the subscribers, which such questions
should've been pointed to.

[1] http://groups.google.com/group/comp.unix.shell/

[…]

  I just remember the sort command, but I still don't know how to get
  the ideal one,

  after I tried the sort -n -k2 , something changed on field 2 but it's
  still a bit away from the one I need.

Unfortunately, the numeric (-n) sort cannot be performed over
the field that contains numbers prefixed with arbitrary strings.
Therefore, it's necessary to split such a field into the
separate prefix and number parts, like (assuming GNU Sed):

$ sed -e 's/^\(\s*\w\+\s\+[^0-9[:blank:]]\+\)\([[:digit:]]\+\)/\1 \2/' 
 238CHO   C10 3617   1.697   5.334   9.317
 238CHO   C11 3624   1.665   5.468   9.092
^D
 238CHO   C 10 3617   1.697   5.334   9.317
 238CHO   C 11 3624   1.665   5.468   9.092
$ 

Then, the output may be sorted on the now-third column, and the
extra space removed.  Thus:

$ sed -e 's/^\(\s*\w\+\s\+[^0-9[:blank:]]\+\)\([[:digit:]]\+\)/\1 \2/' \
  | sort -nk 3,3 -k1,1 \
  | sed -e 's/^\(\s*\w\+\s\+[^0-9[:blank:]]\+\)\s\([[:digit:]]\+\)/\1\2/' 

[…]

-- 
FSF associate member #7257


-- 
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/86livkp9o3@gray.siamics.net



Re: What are the 94 printable characters from the 128 characters of ASCII table?

2011-07-25 Thread Ivan Shmakov
 yudi v yudi@gmail.com writes:

  Hi Paul,
  I am pretty sure you are mistaken,

  126-32 = 94

Let's try a simpler range: 32 to 32 is 1 character.  And 32 - 32
is, obviously, zero.  Doesn't it seem like an off-by-one error?

  and space is a printable character.

Well, I don't have an opinion of my own, but here's what GNU
Libc thinks on the issue:

$ cat  printable.c 
#define _GNU_SOURCE
#include ctype.h
#include stdio.h

int
main ()
{
  int i;

  for (i = 0; i  256; i++) {
printf (  %02x %s%s,
i,
(isprint (i) ? P :  ),
((1 + i) % 8 == 0
 ? \n : ));
  }

  /* . */
  return 0;
}
$ make printable 
cc printable.c   -o printable
$ ./printable 
  0001020304050607  
  08090a0b0c0d0e0f  
  1011121314151617  
  18191a1b1c1d1e1f  
  20 P  21 P  22 P  23 P  24 P  25 P  26 P  27 P
  28 P  29 P  2a P  2b P  2c P  2d P  2e P  2f P
  30 P  31 P  32 P  33 P  34 P  35 P  36 P  37 P
  38 P  39 P  3a P  3b P  3c P  3d P  3e P  3f P
  40 P  41 P  42 P  43 P  44 P  45 P  46 P  47 P
  48 P  49 P  4a P  4b P  4c P  4d P  4e P  4f P
  50 P  51 P  52 P  53 P  54 P  55 P  56 P  57 P
  58 P  59 P  5a P  5b P  5c P  5d P  5e P  5f P
  60 P  61 P  62 P  63 P  64 P  65 P  66 P  67 P
  68 P  69 P  6a P  6b P  6c P  6d P  6e P  6f P
  70 P  71 P  72 P  73 P  74 P  75 P  76 P  77 P
  78 P  79 P  7a P  7b P  7c P  7d P  7e P  7f  
  8081828384858687  
…
  f8f9fafbfcfdfeff  
$ 

So, as per GNU Libc, the printable ASCII characters are 0x20 to
0x7e, inclusive, which amounts to (+ 1 #x7e #x-20) = 95
characters overall.

-- 
FSF associate member #7257


-- 
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/868vrmsxru@gray.siamics.net



Re: problem with ISA SB 16

2011-07-24 Thread Ivan Shmakov
 Long Wind longwind2...@gmail.com writes:

  What's in /dev/sndstat?

  Use the ls command? It shows it's linked to a file in /proc

I guess, the output of either cat(1) or less(1) should be more
informative.

[…]

-- 
FSF associate member #7257


-- 
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/86r55guemq@gray.siamics.net



Re: disable fbcon in Debian Wheezy (Live)?

2011-07-24 Thread Ivan Shmakov
 Camaleón  noela...@gmail.com writes:
 On Sat, 23 Jul 2011 06:28:49 +0700, Ivan Shmakov wrote:

  How do I disable fbcon in Debian Wheezy?  I'm using a custom Debian
  Live image, and it switches to fbcon as soon as it can get to the
  modules!

  (...)

  What VGA chipset?

  I would wonder why the right driver cannot be loaded instead.

It's not the implementation that bothers me at the moment, but
rather the approach.  VGA console works for me, and I see no
compelling reason to switch.  Especially given the necessity to
configure at least the resolution (BTW, I've tried fbset(8), but
it apparently refuses to set either 640x512 or 1280x1024) and
the font (though setfont(8) works correctly.)

Also, I guess that fbcon (in certain configurations) may be
incompatible with KVM over IP solutions (see, e. g., [1]), and
while I'm not using one at the time, I'd be hesitant to using
fbcon on the servers under my control.

[1] http://wiki.metawerx.net/wiki/News

Moreover, I see that the reboot(8) operation was changed from
going through the BIOS to re-initialization of just the kernel.
There, the shutting down kernel instance doesn't switch off to a
VGA text mode, which is contrary to the assumptions of the
starting instance, thus resulting in a screwed display for the
initial stages of the boot process.

Otherwise, fbcon works pretty much correctly for the case in
question.  As per lsmod, the driver is i915.

-- 
FSF associate member #7257


-- 
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/86mxg3vs51@gray.siamics.net



Re: 6rd vs. interfaces(5)

2011-07-24 Thread Ivan Shmakov
 Johan Kullstam kullstj...@verizon.net writes:
 Ivan Shmakov i...@gray.siamics.net writes:

[…]

  Unfortunately, 6rd is only available for Linux 2.6.33 and later (as
  per Wikipedia), which isn't in Squeeze.

  It is actually pretty easy to compile and use your own kernel.
  Perhaps surprisingly, the kernel interface is pretty stable and you
  do not need to upgrade the rest of your world (unlike, say upgrading
  an important shared library).

I've been compiling my kernels since 1999 or so, but thanks to
Debian, I have found some new interests, and thus don't have
enough spare time to spend it that way.

Given that the newer kernels were already backported to Squeeze,
I see little reason to repeat the work that has already been
done.

[…]

-- 
FSF associate member #7257


-- 
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/86ipqrvrwn@gray.siamics.net



Re: 6rd vs. interfaces(5)

2011-07-24 Thread Ivan Shmakov
 Rick Thomas rbtho...@pobox.com writes:
 On Jul 22, 2011, at 5:17 AM, Dejan Ribič wrote:
 Dne 22.7.2011 11:09, piše Ivan Shmakov:

[…]

  Unfortunately, 6rd is only available for Linux 2.6.33 and later
  (as per Wikipedia), which isn't in Squeeze.

[…]

  you can install 2.6.38 from squeeze-backports[1], works perfectly.

  [1]http://backports-master.debian.org/Instructions/

  Or, if you already have a home network with more than one computer
  (if you're interested in IPv6, I'll bet that description fits you)
  I'd recommend to invest a small amount of money (US$200) in a small
  computer (like an OpenRD or one of the plug machines from Marvel,
  or an ALIX board from PC-Engines.

Well, I've taken a mini-ITX case and an Intel Atom 330-based
board as the basis, and assembled such a system almost two years
ago.  In addition to the router (with NetFlow-based
summarization of the passing traffic), it hosts DNS (with
DNSSEC), SMTP, HTTP, and Rsync servers, and an HTTP caching
proxy.

It's currently somewhat undermaintained, but otherwise works
correctly.

  If you don't care about energy usage,

Actually, I do care: these systems are on a UPS, and lower power
consumption means better “survival rate” during the blackouts of
a few to 20 minutes long.

  an even cheaper alternative is to reuse an obsolete PC -- I'll bet
  you've got one of them in your garage waiting to be recycled.)

(That's not a garage, that's my living room.)

Well, I've found that those oldy K6-based systems are comparable
to Intel Atom-based ones when it comes to overall power
consumption.  (I guess that they provide less performance per
unit of electric power, though.)

  Make that your IPv6 gateway -- run Debian testing on it.  Having a
  separate single-purpose gateway router has the advantage that you can
  experiment with things like firewalls and new drivers without
  endangering the rest of your machines.

Actually, I guess that experiments with connectivity can give
much more trouble than experiments with, say, one's own /home,
as they could readily anger the other “interested parties.”

Thus, I'd prefer running a Debian “stable” system on a router.

  That's what I did.  I'm quite pleased with the result.

-- 
FSF associate member #7257


-- 
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/86ei1fvqxx@gray.siamics.net



Re: limiting email sizes when sending files

2011-07-24 Thread Ivan Shmakov
 Andrew McGlashan andrew.mcglas...@affinityvision.com.au writes:

[…]

  The other thing that many people don't seem to understand, is that
  sending a large binary file as an attachment requires the attachment
  to be encoded back to printable characters -- this can increase the
  payload of an email by 50%.

Huh?  Base64 has overhead of only 33.(3)%?

[…]

-- 
FSF associate member #7257


-- 
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/86aac3vqjk@gray.siamics.net



Re: disable fbcon in Debian Wheezy (Live)?

2011-07-24 Thread Ivan Shmakov
 Camaleón  noela...@gmail.com writes:
 On Sun, 24 Jul 2011 18:23:54 +0700, Ivan Shmakov wrote:

[…]

  Otherwise, fbcon works pretty much correctly for the case in
  question.  As per lsmod, the driver is i915.

  Intel KMS requires fbcon, unless this has changed recently... and for
  Intel cards KMS is also mandatory, so I dunno what to suggest :-)

What do you mean by “mandatory”?  I've ran the system without
both the i915 module and fbcon, and had no problems with that
setup so far.  In particular, X works correctly.

-- 
FSF associate member #7257


-- 
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/8662mrv8p8@gray.siamics.net



Re: problem with ISA SB 16

2011-07-24 Thread Ivan Shmakov
 Long Wind longwind2...@gmail.com writes:
 On Sun, Jul 24, 2011 at 7:01 AM, Ivan Shmakov wrote:

  I guess, the output of either cat(1) or less(1) should be more
  informative.

[…]

  below is output by cat /dev/sndstat:

  Sound Driver:3.8.1a-980706 (ALSA v1.0.16 emulation code)
  Kernel: Linux debian 2.6.26-2-686 #1 SMP Sat Dec 26 09:01:51 UTC 2009 i686
  Config options: 0

  Installed drivers:
  Type 10: ALSA emulation

  Card config:
  --- no soundcards ---

[…]

Well, I guess that the card was somehow left undetected by
snd-sb16.

I wonder, why isapnp was disabled?  Could it be enabled, or
could the card's configuration be specified explicitly via the
module parameters (use $ /sbin/modinfo snd-sb16 to get the list;
port=, irq=, dma8=, dma16= are the usual ones.)

-- 
FSF associate member #7257


-- 
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/861uxfv80y@gray.siamics.net



Re: limiting email sizes when sending files

2011-07-24 Thread Ivan Shmakov
 Andrew McGlashan andrew.mcglas...@affinityvision.com.au writes:
 Ivan Shmakov wrote:

  Huh?  Base64 has overhead of only 33.(3)%?

  Won't that vary by file?

I guess it won't.  Base64 sends each 6-bit of data as an ASCII
character, which is (usually) represented by an octet.  This
gives exactly 4 octets of output for every 3 octets of input:

(* 4 6) = 24
(* 3 8) = 24

The only variation that Base64 has is that the output is padded
to the 4-octet boundary (with up to two ='s), but the effects of
this are negligible for the files of more than a few kiB long.

  It's never going to be the same for every file.

It's not unusual to compress the files before the Base64
encoding is applied.  And indeed, the compression ratio may
vary.

  It's still alot of extra overhead, not just the extra data.

Yes.

-- 
FSF associate member #7257


-- 
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/86wrf7tokx@gray.siamics.net



  1   2   >