Changes between Version 4 and Version 5 of cypress/BasicLinuxComands
- Timestamp:
- 08/18/15 16:24:04 (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
cypress/BasicLinuxComands
v4 v5 2 2 3 3 == Basic Linux Commands == 4 Here are a few of the common Linux commands you will use to navigate the clustersand manipulate files and directories.4 Here are a few of the most common Linux commands you will use. These commands will allow you to navigate the clusters as well as create, destroy, and manipulate files and directories. 5 5 6 6 === man === … … 10 10 [tulaneID@cypress1 ~]$ man <command name> 11 11 }}} 12 === pwd and cd === 13 The '''pwd''' command lists the present working directory. The '''cd''' command changes directory. 12 13 === pwd === 14 On a *nix system, directories are containers for files and objects. The '''pwd''' command lists the present working directory. This is the "where am I?" command. 14 15 {{{ 15 16 [tulaneID@cypress1 ~]$ pwd 16 17 /home/tulaneID 17 [tulaneID@cypress1 ~]$ cd NextDirectoryUp 18 [tulaneID@cypress1 ~]$ pwd 19 /home/tulaneID/NextDirectoryUp 20 }}} 18 }}} 19 20 === cd === 21 22 The '''cd''' command changes directory. 23 24 {{{ 25 [tulaneID@cypress1 ~]$ cd NextDirectoryDown 26 [tulaneID@cypress1 ~]$ pwd 27 /home/tulaneID/NextDirectoryDown 28 }}} 29 30 As you can see, NextDirectoryDown is a ''subdirectory'' of tulaneID. And tulaneID is itself a subdirectory of home, which is a subdirectory of the root directory (/). Thus, the directories form a downward facing tree with all directories stemming from the root directory. You can move on level up in the try by typing '''cd ..'' 31 32 {{{ 33 [tulaneID@cypress1 ~]$ pwd 34 /home/tulaneID/NextDirectoryDown 35 [tulaneID@cypress1 ~]$ cd .. 36 [tulaneID@cypress1 ~]$ pwd 37 /home/tulaneID 38 }}} 39 40 And you can navigate using either relative or absolute paths. That is, you can enter directory paths relative to your current location, or you can entire the entire path starting with the root directory. 41 42 {{{ 43 [tulaneID@cypress1 ~]$ pwd 44 /home 45 [tulaneID@cypress1 ~]$ cd tulaneID/NextDirectoryDown 46 [tulaneID@cypress1 ~]$ pwd 47 /home/tulaneID/NextDirectoryDown 48 [tulaneID@cypress1 ~]$ cd /home 49 [tulaneID@cypress1 ~]$ pwd 50 /home 51 }}} 52 21 53 === ls === 22 List files.54 The '''ls''' command will list files in the current directory. 23 55 {{{ 24 56 [tulaneID@cypress1 ~]$ ls … … 45 77 /u00/user/testdir 46 78 }}} 79 47 80 === rm === 48 81 Remove files and directories. CAUTION: THERE IS NO UNDOING THIS COMMAND.