Category: Command Line

Copy all Txt Files

Find and copy all files with ‘.txt’ extention from a directory to another find /home/binnyva -name ‘*.txt’ | xargs cp…

Change the Shell

Use this command to change the default shell you are using. chsh

Mount Windows Network Share with Samba

Use this command to mount a share on a windows system. It uses Samba. mount -t smbfs -o username=user,password=pass //WinClient/share…

Sort and Unique

Sort contents of a file and remove repeated lines sort file.txt | uniq

Restore Backup Created by dump

Restoring a backup created by the dump command. restore -if home_backup.bak

Show all Installed Packages in Debian

Show all deb packages installed on the system dpkg -l

Incremental Backup using dump

Make a incremental backup of directory ‘/home/binnyva’ dump -1aj -f home.bak /home/binnyva/

Backup Using ‘dump’ command

Make a full backup of directory ‘/home’ dump -0aj -f home.bak /home

lsattr

Show specials attributes lsattr

Make a File Immutable

Makes a file immutable – it can not be removed, altered, renamed or linked chattr +i file