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?
Asked
Active
Viewed 832 times
0

Devon Ville
- 2,001
- 2
- 19
- 32
1 Answers
3
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.

Marco
- 849
- 1
- 7
- 21
-
Not quite - I already have an instance of mc open, and I want create a script to cd into specific folders/virtualfs when I call it from mc. In a sense, I'm trying to re-create the directory hotlist, since I think the present one can not fulfill my needs (find-as-you-type for the items). – Devon Ville Feb 20 '13 at 10:48
-
And needless to say, that whenever I try using mc [some-folder] it tries to open another instance, which is not what I want. – Devon Ville Feb 20 '13 at 15:02
-
You did not mention that you want to change the directory if an *existing* instance. Sorry, I have no clue about how to interact with an already established instance. – Marco Feb 20 '13 at 15:10