How do I get the current Unix time in milliseconds (i.e number of milliseconds since Unix epoch January 1 1970)?
I need to test sub-domains on my localhost. How can I effectively have this result of adding *.localhost.com
to my /etc/hosts/
file?
If it's not possible, how do I work around this problem? I need to test wildcard sub-domains on my localserver. It is a Django devserver, can the Django dev server handle the sub-domains? Can some other piece of software/routing give me the end result I want?
I have an existing public/private key pair. The private key is password protected, and the encryption may be either RSA or DSA. These keys are the kind you generate with ssh-keygen
and generally store under ~/.ssh
.
I'd like to change the private key's password. How do I go about it, on a standard Unix shell?
Also, how do I simply remove the password? Just change it to empty?
I have to copy a large directory tree, about 1.8 TB. It's all local. Out of habit I'd use rsync
, however I wonder if there's much point, and if I should rather use cp
.
I'm worried about permissions and uid/gid, since they have to be preserved in the copy (I know rsync does this). As well as things like symlinks.
The destination is empty, so I don't have to worry about conditionally updating some files. It's all local disk, so I don't have to worry about ssh or network.
The reason I'd be tempted away from rsync, is because rsync might do more than I need. rsync checksums files. I don't need that, and am concerned that it might take longer than cp.
So what do you reckon, rsync
or cp
?
I'm doing some test-runs of long-running data migration scripts, over SSH. Let's say I start running a script around 4 PM; now, 6 PM rolls around, and I'm cursing myself for not doing this all in screen
.
Is there any way to "retroactively" nohup
a process, or do I need to leave my computer online all night? If it's not possible to attach screen
to/nohup
a process I've already started, then why? Something to do with how parent/child proceses interact? (I won't accept a "no" answer that doesn't at least address the question of 'why' -- sorry ;) )