cost of shorting a stock

What is the cost of shorting a stock, aside from the transaction fees? is it LIBOR? How long can you practically leave a short in place?

Depends on what kind of deal you have with your broker and what stock you short. If you short hard to borrow stocks you pay borrow fees on them. My fund a few years ago was short TZOO and we were paying a 3%/month borrow fee. There is no limit on how long you can leave a short in place and if you have a good relationship with the broker he will call you and tell you that your borrow is about to be called away so you can find new borrow. That, of course, does not happen in retail brokerage accounts.

Depends on the broker but it’s usually LIBOR plus a mark-up. The mark-up depends on how much you borrow; the more you borrow, the lower the mark-up interest rate. You can leave a short in place as long as you can meet margin requirements(if the trade goes sideways; price of stock increases). But margin rates are so high, it can be as much as 8%(LIBOR + mark-up) or more, that it is cost prohibitive to short a stock for a very long period of time.

I think you have to pay the dividends to the original owner (even though the stock has been sold), right?

Yes.