• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 288
  • Last Modified:

Simple commands

I know that these are dumb questions but please bear with me.
I need the exact synatax or keystrokes to do the following:
To save a file in vi ?
To change directory from c: drive to A: drive ?
From a sub-directory on A: drive, how do I create a sub-directory in another directory on A: drive.
1 Solution
save a file in VI:
(escape) :w (enter)

In unix there are no drives. you need to mount your floppy drive, A to the file system and then access it with the `cd` command.

create directory:

kenny1Author Commented:
I do not totally reject this answer but you said there are no drives. and that I need to mount the floppy drive, A to the file system and then access it with the `cd` command.
How would I do this ?
Please bear in mind that I do not have access to a UNIX machine, and that this is a research exercise for college work.
eplain the question better then...
I  seem to misunderstood the part about the drives.

See, in unix there is no seperation between disk drives in the same manner as in DOS/Win...
there is no A, B, C... there is a directory tree which starts from the root `/`.
In UNIX, everything is treated as a file (or directory). What you need to know is that everything can be accessed through a pathname. The standard path for the floppy drive is "/floppy", just like for the CD-ROM it's "/cdrom", etc...

 Also, in UNIX you always have to "mount" filesystems before you can use them. Just like you also have to "unmount" them if you're going to remove them (like opening the CD drive).

 To "mount" and "umount" a filesystem you'd do something like:

mount -t ext2 /dev/fd0 /floppy

then to unmount:

umount /floppy

Explanation of parameters:

-t (type) where ext2 is the ext2 filesystem. (Linux)

/dev/fd0 is the floppy disk drive 0, or "A" in DOS.

/floppy is the mount point. An empty directory that you create with the sole purpose of mounting another filesystem over it.

 You know, it's not like piece of cake to understand all this if you've been used to the MS world for your whole life but you get the point after some time and you'll also start thinking that the DOS way of working is retro.
. or simply use mtools, like:
   mdir a:
   mcd a:/subdir
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now