Posted in Uncategorized

Data Import Efficiency – A Case in R

Yet Another Blog in Statistical Computing

Below is a piece of R snippet comparing the data import efficiencies among CSV, SQLITE, and HDF5. Similar to the case in Python posted yesterday, HDF5 shows the highest efficiency.

View original post

Posted in programming unix

Users, Groups and Permissions on Linux

  1. Adding a user
    sudo adduser <username>
    e.g.: sudo adduser thabung
  2. Delete a User
    sudo deluser <username>
    sudo userdel thabung
  3. Changing the user password
    sudo passwd <username>
    sudo passwd thabung
  4. Adding a group
    sudo groupadd <groupName>
    sudo groupadd programmers
  5. Removing a group
    sudo groupdel <groupname>
    sudo groupdel programmers
  6. Group information
    sudo vi /etc/group
  7. List the groups which the user is in
    groups <username>
    groups thabung
  8. File permission
    Write : 4, Read : 2, Execute: 1
    So, 4+2 = 6, means file/folder has read& write permissions
    4+2+1 = 7, means read, write & execute permissions(full control)
    change the file permission of a folder
    sudo chmod -R (owner)(group)(public) <folderName>
    e.g. sudo chmod -R 775 music
    It means:
    The owner can Read + Write + Execute (4 + 2+ 1 = 7)
    Group members can Read + Write + Execute (4 + 2+ 1 = 7)
    Public can only Read + Execute (4 + 1 = 5), but cannot write/modifychange the permission of a file
    sudo chmod  (owner)(group)(public) <fileName>
    e.g. sudo chmod -R 775 music/animals.mp3
  9. Change the file/folder ownership
    sudo chown -R <username>:<groupname> <pathToFolder>
    e.g.sudo chown -R thabung:www-data /var/www/mysite