SnapOverflow

SnapOverflow Logo SnapOverflow Logo

SnapOverflow Navigation

  • Home
  • Server
  • Ubuntu

Mobile menu

Close
  • Home
  • System Administrators
    • Hot Questions
    • New Questions
    • Tags
  • Ubuntu
    • Hot Questions
    • New Questions
    • Tags
  • Help
Home / user-1134

Tom Feiner's questions

Martin Hope
Tom Feiner
Asked: 2012-01-10 01:06:08 +0800 CST

How to programmatically migrate an EC2 EBS AMI to other regions?

  • 5

Before EBS based AMIs were available, it was possible to use the command ec2-migrate-image in order to migrate AMIs to different regions.

Is there a simple way to do the same for EBS based AMIs? Either using the official amazon EC2 API command line tools or using a library like boto?

amazon-ec2 amazon-web-services amazon-ebs
  • 2 Answers
  • 1102 Views
Martin Hope
Tom Feiner
Asked: 2010-04-26 03:07:29 +0800 CST

Is it possible to use rsync over sftp (without an ssh shell)?

  • 74

Rsync over ssh, works great every time.

However, trying to rsync to a host which allows only sftp logins, but not ssh logins, provides the following error:

rsync -av /source ssh user@remotehost:/target/

protocol version mismatch -- is your shell clean? (see the rsync man page for an explanation) rsync error: protocol incompatibility (code 2) at compat.c(171) [sender=3.0.6]

Here's the relevant section from the rsync man page:

This message is usually caused by your startup scripts or remote shell facility producing unwanted garbage on the stream that rsync is using for its transport. The way to diagnose this problem is to run your remote shell like this:

          ssh remotehost /bin/true > out.dat

then look at out.dat. If everything is working correctly then out.dat should be a zero length file. If you are getting the above error from rsync then you will probably find that out.dat contains some text or data. Look at the contents and try to work out what is producing it. The most com‐ mon cause is incorrectly configured shell startup scripts (such as .cshrc or .profile) that contain output statements for non-interactive logins.

Trying this on my system produced the following in out.dat:

ssh-dummy-shell: Command not allowed.

As I thought, the host is not allowing ssh logins.

The following link shows that it is possible to accomplish this task using fuse with sshfs - however it is extremely slow, and not fit for production use.

Is there any chance of getting rsync sftp to work?

ssh rsync sftp
  • 8 Answers
  • 131576 Views
Martin Hope
Tom Feiner
Asked: 2009-02-26 05:42:42 +0800 CST

How can I sort du -h output by size

  • 1346

I need to get a list of human readable du output.

However, du does not have a "sort by size" option, and piping to sort doesn't work with the human readable flag.

For example, running:

du | sort -n -r 

Outputs a sorted disk usage by size (descending):

du |sort -n -r
65108   .
61508   ./dir3
2056    ./dir4
1032    ./dir1
508     ./dir2

However, running it with the human readable flag, does not sort properly:

du -h | sort -n -r

508K    ./dir2
64M     .
61M     ./dir3
2.1M    ./dir4
1.1M    ./dir1

Does anyone know of a way to sort du -h by size?

linux bash du gnu
  • 30 Answers
  • 1001294 Views
Martin Hope
Tom Feiner
Asked: 2009-06-08 23:08:12 +0800 CST

Open Source PDF reader for windows as an alternative to Adobe reader

  • 17

With the latest javascript vulnerabilities in Adobe reader and bloat it has aquired over the years, I've been thinking of moving the network I'm in charge of to a different product for PDF reading on Windows.

The ideal PDF reader should be something that is:

  • Small in size (Adobe reader is more than 200MB these days after installation).
  • As secure by default as possible (For example, javascript disabled by default).
  • Nice looking and easy to use interface.
  • Not bloated with features (I just want to read PDFs, that's it).
  • Does not install any toolbars/unwanted add ons/spyware.
  • Does not display any ads while viewing PDFs.
  • Preferably Open Source. (this pretty much ensures no ads).
  • Full Unicode support.

Idealy , something like evince from gnome, will be the best option, but unfortunately that's not available on Windows.

Foxit is an option, as it is small, and has a nice interface. But it still has javascript enabled by default which might lead to vulnerabilities - and it installs a toolbar , and displays ads while reading PDFs which is distracting.

There is a site dedicated to Open Source PDF readers, pdfreaders.org, however, the Windows pdf readers each have their problems, mostly the interface is not as convenient (as evince, adobe or foxit).

Here's a list of all PDF software from WikiPedia. There's a "Viewers" section for each OS.

What Windows PDF reader would you recommend ?

windows deployment pdf adobe
  • 9 Answers
  • 27479 Views
Martin Hope
Tom Feiner
Asked: 2009-05-24 23:16:53 +0800 CST

GNU less: How can I search while ignoring case sensitivity without using less -I option?

  • 66

From GNU less manpage

-i or --ignore-case

Causes searches to ignore case; that is, uppercase and lowercase are considered identical.

This option is ignored if any uppercase letters appear in the search pattern; in other words, if a pattern contains uppercase letters, then that search does not ignore case.

-I or --IGNORE-CASE

Like -i, but searches ignore case even if the pattern contains uppercase letters.

This is a great way of searching in GNU less, while ignoring case sensitivity. However, you must know in advance that you'd like to search while ignoring case sensitivity and indicate it in the command line.

vim solves this problem by letting the user specify \c before a search, to indicate that the pattern should be searched while ignoring case sensitivity.

Is there a way to do the same in less (without specifying -I in the command line)?

linux bash command-line-interface
  • 2 Answers
  • 30289 Views
Martin Hope
Tom Feiner
Asked: 2009-05-11 04:15:24 +0800 CST

How to migrate data from a Firebird database to PostGreSQL on Linux

  • 1

Are there any good tools to migrate existing firebird databases to PostgreSQL for Linux systems?

I've looked at: FBexport which can be used to dump the data as insert statements, but it's mainly written to export/import from one firebird db to another, not as a migration tool.

There's also: Firebird to PostgreSQL Win32 tool, but it's only for win32 systems.

Is there any good tool to do this? Or should I just roll my own?

linux migration postgresql firebird
  • 4 Answers
  • 6112 Views

Sidebar

Stats

  • Questions 681965
  • Answers 980273
  • Best Answers 280204
  • Users 287326
  • Popular
  • Answers
  • Marko Smith

    Can you pass user/pass for HTTP Basic Authentication in URL parameters?

    • 5 Answers
  • Marko Smith

    Ping a Specific Port

    • 18 Answers
  • Marko Smith

    Check if port is open or closed on a Linux server?

    • 7 Answers
  • Marko Smith

    How to automate SSH login with password?

    • 10 Answers
  • Marko Smith

    How do I tell Git for Windows where to find my private RSA key?

    • 30 Answers
  • Marko Smith

    What's the default superuser username/password for postgres after a new install?

    • 5 Answers
  • Marko Smith

    What port does SFTP use?

    • 6 Answers
  • Marko Smith

    Command line to list users in a Windows Active Directory group?

    • 9 Answers
  • Marko Smith

    What is a Pem file and how does it differ from other OpenSSL Generated Key File Formats?

    • 3 Answers
  • Marko Smith

    How to determine if a bash variable is empty?

    • 15 Answers
  • Martin Hope
    Davie Ping a Specific Port 2009-10-09 01:57:50 +0800 CST
  • Martin Hope
    Smudge Our security auditor is an idiot. How do I give him the information he wants? 2011-07-23 14:44:34 +0800 CST
  • Martin Hope
    kernel Can scp copy directories recursively? 2011-04-29 20:24:45 +0800 CST
  • Martin Hope
    Robert ssh returns "Bad owner or permissions on ~/.ssh/config" 2011-03-30 10:15:48 +0800 CST
  • Martin Hope
    Eonil How to automate SSH login with password? 2011-03-02 03:07:12 +0800 CST
  • Martin Hope
    gunwin How do I deal with a compromised server? 2011-01-03 13:31:27 +0800 CST
  • Martin Hope
    Tom Feiner How can I sort du -h output by size 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich What is a Pem file and how does it differ from other OpenSSL Generated Key File Formats? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent How to determine if a bash variable is empty? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus How do you find what process is holding a file open in Windows? 2009-05-01 16:47:16 +0800 CST

Related Questions

Trending Tags

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • Home
  • Questions
    • Hot Questions
    • New Questions
  • Tags
  • Help

Footer

SnapOverflow

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Help

© 2022 SOF-TR. All Rights Reserve