Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am lazy to login to my server via ssh to execute just one command.

Like I need to touch /var/www/dir/file.doc. Can I do something like:

srun touch /var/www/dir/file.doc
share|improve this question
Best to put the part after touch or any command in general in single quotes so client shell doesn't expand it. – Ibn Ar-Rashid May 16 '11 at 9:33
up vote 5 down vote accepted

Yes, you can do

ssh touch /var/www/dir/file.doc
share|improve this answer
OMG :D I didn't even try obvious solution! Thank you – fl00r May 16 '11 at 9:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .