Linux Tricks

5 Best Vector Graphics Editors for Linux => LibreOffice Draw 
5 Best Free Video Editing Software for Linux In 2017 => Kdenlive
Best Free Animation Software: 2D and 3D Animation =>Blender

Xournal is an application for notetaking, sketching, keeping a journal using a stylus.


To create .tar.gz file:

tar -cvzf [archive name] [file(s)/location(s)]

The options -cvzf work as follows:

  • c – creates a new archive.
  • v – lists out the files it's compressing.
  • z – compresses the file.
  • f – specifies the file name.


To extract .tar.gz file:

tar -xvzf [archive name]

The options -xvzf work as follows:

  • x – instructs tar to extract the files from the zipped file.
  • v –lists out the files it's extracting.
  • z – instructs tar to decompress the files.
  • f – tells tar the filename.

Make HOME permanent

sudo blkid
sudo gedit /etc/fstab
Add the following line at the end:
UUID=<blkid>    /home    ext4    defaults   0  2
Take care to choose the appropriate filesystem here, e.g. ext3 if ext3 formatted

File sync (remote/local)
grsync

Boot Repair
sudo add-apt-repository ppa:yannubuntu/boot-repair 
sudo apt-get update 
sudo apt-get install -y boot-repair && boot-repair
Below command can be used to repair grub
sudo update-grub

Data Recovery:
TestDisk + PhotoRec

Search for keyword in a directory hierarchy / files
grep -r ubuntu .

Search for files in a directory hierarchy
find . -name temp.txt

Download file with multiple connections:
aria2c -x 16 urlpath

Zip file without compression:
zip -r -0 newfile.zip folder

Fix the MBR using lilo using the command: 
sudo lilo -M /dev/sda mbr

List Partition table:
sudo parted -l

Create file image container:
$ dd if=/dev/zero of=~/theFile.img bs=1M count=10
$ dd if=/dev/zero of=disk.img bs=4096 count=1000000  (for 4GB disk)
$ /sbin/mkfs.ext4 theFile.img
$ sudo mount -o loop theFile.img /mnt/tmp/
$ df -h  /dev/loop0
   9,7M  1,1M  8,1M  12% /mnt/tmp
#sudo cp file.txt  /mnt/tmp
Refer: Use A File As A Linux Block Device – JamesCoyle.net 

To Do after Ubuntu Installation:
sudo apt-get install vim
sudo apt install gdebi-core
sudo apt install gnome-shell-extension-dash-to-panel  

Set the brightness
cat /sys/class/backlight/acpi_video0/brightness
sudo gedit /etc/rc.local
Right above exit 0 add
echo your_value_here > /sys/class/backlight/acpi_video0/brightness

For BlueLight Filter: Redshift

To change template directory(useful in Ubuntu 16.04 new file option)
gedit ~/.config/user-dirs.dirs
XDG_TEMPLATES_DIR="$HOME/Templates"

No comments:

Post a Comment