Changes between Version 25 and Version 26 of cypress/BasicLinuxComands


Ignore:
Timestamp:
Aug 9, 2019 1:34:20 PM (2 years ago)
Author:
fuji
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • cypress/BasicLinuxComands

    v25 v26  
    2828
    2929{{{
    30 [tulaneID@cypress1 ~]$ cd workshop
    31 [tulaneID@cypress1 workshop]$ pwd
     30[tulaneID@cypress1 ~]$ cd hpc-workshop
     31[tulaneID@cypress1 hpc-workshop]$ pwd
     32/home/tulaneID/hpc-workshop
     33[tulaneID@cypress1 hpc-workshop]$
     34}}}
     35
     36As you can see, workshop 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 one level up in the tree by typing '''cd ..''
     37
     38{{{
     39[tulaneID@cypress1 hpc-workshop]$ pwd
    3240/home/tulaneID/workshop
    33 [tulaneID@cypress1 workshop]$
    34 }}}
    35 
    36 As you can see, workshop 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 one level up in the tree by typing '''cd ..''
    37 
    38 {{{
    39 [tulaneID@cypress1 workshop]$ pwd
    40 /home/tulaneID/workshop
    41 [tulaneID@cypress1 workshop]$ cd ..
     41[tulaneID@cypress1 hpc-workshop]$ cd ..
    4242[tulaneID@cypress1 ~]$ pwd
    4343/home/tulaneID
     
    5050[tulaneID@cypress1 ~]$ pwd
    5151/home
    52 [tulaneID@cypress1 ~]$ cd tulaneID/workshop
    53 [tulaneID@cypress1 workshop]$ pwd
    54 /home/tulaneID/workshop
     52[tulaneID@cypress1 ~]$ cd tulaneID/hpc-workshop
     53[tulaneID@cypress1 hpc-workshop]$ pwd
     54/home/tulaneID/hpc-workshop
    5555[tulaneID@cypress1 ~]$ cd /home
    5656[tulaneID@cypress1 ~]$ pwd
     
    7878If you would like to see if a directory contains a specific file, you can pass the directory path and file name to '''ls''' as an argument
    7979{{{
    80 [tulaneID@cypress1 ~]$ ls workshop
     80[tulaneID@cypress1 ~]$ ls hpc-workshop
    8181BlasLapack  Eigen3        HeatMass    JobArray1  JobDependencies  MPI     PETSc  precision  Python  ScaLapack  SimpleExample  TestCodes  VTK
    8282CUDA        FlowInCavity  hybridTest  JobArray2  Matlab           OpenMP  PI     PSE        R       SerialJob  SLU40          uBLAS
     
    8686Setting the ''-l'' flag will display files along with their permissions and ownership.
    8787{{{
    88 [tulaneID@cypress1 ~]$ ls -l workshop
     88[tulaneID@cypress1 ~]$ ls -l hpc-workshop
    8989total 100
    9090drwxr-xr-x 3 fuji hpcstaff 4096 Aug 21 13:06 BlasLapack
     
    131131Remove files and directories. CAUTION: THERE IS NO UNDOING THIS COMMAND.
    132132{{{
    133 [tulaneID@cypress1 ~]$ rm workshop
     133[tulaneID@cypress1 ~]$ rm hpc-workshop
    134134}}}
    135135If you would like to remove a directory and all of its contents use the following command:
    136136{{{
    137 [tulaneID@cypress1 ~]$ rm -ri workshop
    138 rm: descend into directory `workshop'? y
    139 rm: descend into directory `workshop/PI'? n
    140 rm: descend into directory `workshop/uBLAS'? ^C
     137[tulaneID@cypress1 ~]$ rm -ri hpc-workshop
     138rm: descend into directory `hpc-workshop'? y
     139rm: descend into directory `hpc-workshop/PI'? n
     140rm: descend into directory `hpc-workshop/uBLAS'? ^C
    141141[tulaneID@cypress1 ~]$
    142142}}}
     
    147147If you are confident with the command line and your understanding of file locations you can use the ''f'' flag instead of ''i'' to force deletion of all files without prompting:
    148148{{{
    149 [tulaneID@cypress1 ~]$ rm -rf workshop
    150 [tulaneID@cypress1 ~]$ ls workshop
     149[tulaneID@cypress1 ~]$ rm -rf hpc-workshop
     150[tulaneID@cypress1 ~]$ ls hpc-workshop
    151151ls: cannot access workshop: No such file or directory
    152152[tulaneID@cypress1 ~]$
     
    155155Do this again to download sample files:
    156156
    157 {{{svn co file:///home/fuji/repos/workshop ./workshop}}}
     157{{{git clone https://hidekiCCS@bitbucket.org/hidekiCCS/hpc-workshop.git}}}
    158158
    159159== rmdir ==