NFS
NFS Server Display current NFS shares on server: Edit server NFS configuration: Share example: Export “NFS table” (this is necessary after NFS edit) : Restarts NFS to apply changes: NFS Client Share mounting examples: terminal: fstab:
very very slowly
NFS Server Display current NFS shares on server: Edit server NFS configuration: Share example: Export “NFS table” (this is necessary after NFS edit) : Restarts NFS to apply changes: NFS Client Share mounting examples: terminal: fstab:
Samba provides file and print services on Linux for Windows computers. To install Samba: The configuration file for Samba is located at /etc/samba/smb.conf, edit samba configuration: Share example: Restart samba: (stop, start)
Edit fstab: Mount disk: Different partitions types: ext4, ext2, ext3, reiserfs, xfs, jfs, smbfs, iso9660, vfat, ntfs, swap, auto Mount nfs share: Mount samba share: share.name NOT dir.name! “Reloads” fstab for changes to take effect:
Copies files from a source to destination. Syncs directories without copying already existing files and updating modified files. Works over SSH. remote -> local: local -> local: local -> remote: Options/flags: -a -a equals to use of following options -rlptgoD recursively copy files and directories copy symlinks as symlinks preserve permissions preserve group preserve modification … Read moreRsync
To move a certain number of files, this command must be executed from the source or parent directory: xxx – the number of files to be moved
Install Fdupes: Search for duplicate files in directory: Recursive search in all sub-directories: Delete duplicate files in directory: Recursively delete duplicate files in all sub-directories:
Unzip all zip files in current directory: Extract all tar.xz files in current directory:
Most commonly used List command is: Example output: d rw-rw-r– 1 piroman piroman 65379 oct 12 11:11 z9a6t8j0qis51.jpg type permissions link count owner group size date time name LS options/switches: ls -a list all files including hidden file starting with ‘.’ ls –color colored list [=always/never/auto] ls -d list directories – with ‘ */’ ls … Read moreLS (List) command
Sets Access Control Lists (ACLs) – adds permissions to files and directories for a user that is not a member of a group owning them. Gives a read permission to user for target directory and sub directories and files, although the target directory is owned by another user: By adding wx parameters, user gets both … Read moresetfacl – Set File Access Control List