You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

On linux, unlike the VAX, file names and directory names are case sensitive. You can tab complete instead of typing in the whole filename/directory name. Press tab twice to list possible completions.

Working with files and directories from the Linux commandline:

Command

Description

pwd

Show current directory

cd ~

Change to your home directory (same as your W: drive on WIndows)

cd dirname

Change directory to a subfolder named dirname

cd ..

Go up a directory

ls

List files and folders in the current directory (with color highlighting)

dir

List files and folders in the current directory without color highlighting

mkdir dirname

Make a new subfolder named dirname

rmdir dirname

Deletes the subfolder name dirname (forlder must be empty)

rm filename

Deletes the file named filename

rm -rf dirname

Recursively deletes the non-empty folder name dirname and all contained files and folders

mv oldname newname

Rename a file or directory from oldname to newname

mv src destination

Move a file or directory from src to destination

cp src destination

Copies a file from src to destination

cp -av src destination

Recursively copies a folder from src to destination

xdg-open .

Open a gui file browser in the current directory

xdg-open file

Open a file

  • No labels