Common Unix Commands

Files/Directories cp source destination Copies the source file to destination. ls Listsd the content of the current directory. ls -l – shows also extra info. ls -R – shows content of directory and also subdirectories. ls -m – displays the content in comma sepparated. mv source destination Moves source to destination (if a directory, else it renames source to destination) cd directory Changes the current directory. cd ~ – will change the path to the root of the user. cd / – changes the path to the root of the filesystem. cd .. – changes the path to the directory above. pwd Displays the current directory mkdir directory Creats a new directory. rm -R directory Deletes a directory including subdirectories. The user will be promoted for each read-only file. rm -Rf directory Deletes a directory including subdirectories. The user will NOT be promoted for each read-only file. rm directory Deletes a file. chmod entity+mode+permission file/directory Changes the mode of the file in terms od permissions. Entiry= u (for user), g (for group), o (for other), a (for all). Mode = + (for adding permissions) or – (for removing permissions). Permissions= r (for read), w (for write), x (for execute). Example: Continue reading Common Unix Commands