Question

I'm trying to use a shell script to have mc cd into some directories, be them virtualfs directories (e.g. ftp, ssh) or local directories. How should I do that?

Was it helpful?

Solution

mc allows you only to launch a new instance with requested path open in one of the panels. For local files you can just provide the directory as argument:

mc somedirectory

If you prepend sh:// you can open remote directories on other machines as well:

mc sh://user@host/somedirectory

This works from the command line as well as from shell scripts.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top