Previous Up Next

5.6.1  Working directories: pwd cd

Xcas has a working directory where it stores files that it creates; typically this is the user’s home directory. The pwd command will tell you what the current working directory is, and and the cd command lets you change it.


Example.
Input:

pwd()

Output: might be something like:

/home/username



Example.
If you enter:
Input:

cd("foo")

or (on a Unix system):
Input:

cd("/home/username/foo")

then the working directory will change to the directory foo, if it exists. Afterwards, any files that you save from Xcas will be in that directory.


To load or read a file, it will need to be in the working directory. Note that if you have the same file name in different directories, then loading the file name will load the file in the current directory.


Previous Up Next