mkdir (make directory)
-v verbose output -p creates entire path {} creates multiple directories in the same directory -m permissions sets permissions for the created directory
very very slowly
-v verbose output -p creates entire path {} creates multiple directories in the same directory -m permissions sets permissions for the created directory
NFS Server Install NFS server: Display current NFS shares on server: Edit server NFS configuration: Share example: Read only access to an entire subnet: Read & write access to an entire subnet: 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: Password protected share example: System user’s password must be added to Samba: For changes to take effect, you must 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 equals to use of following options -rlptgoD (basically -a options makes rsync a fully fledged backup tool) –delete deletes files from the destination … 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
To count files recursevly (in all sub dirs):
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