Gist List

Move all sub files and folders

# Move all visible files and folders
mv  -v ~/Downloads/* ~/Videos/

# Now move all hidden files and folders
mv /your_source_folder/* /your_destination_folder 2> /dev/null
mv /your_source_folder/.* /your_destination_folder 2> /dev/null

Change folder mode

sudo chmod 755 folderName/

Clean local repo

git gc

Delete all files and folder

# Remove folder with all files and folder included.
rm -r folder_name/

# Remove it forcefully
rm -rf foldern_name/

# If any issue occurred, use this one.
rm -rfv /home/delete/
-r : Remove directories and their contents recursively
-f : Force option i.e. ignore nonexistent files and arguments, never prompt
-v : Verbose option

Extract .gz file

tar -xzvf file_name.tar.gz

# x mean extract. option to extract the file
# z is option to tell tar to extract the file using gzip method
# v stand for verbose, and you know what it mean..
# f is option to tell tar that you are going to give it a file name to work with

List file and folder with size

du -hcs *

Download websites

wget -r --no-parent -e robots=off https://your_website.com

httrack "https://your_website.com"  -O "your_local_path" -%v -s0

Laravel – Test email using tinker

Once you run following command, it will send email to [email protected]. First parameter is a view. In this example, I have used welcome.blade.html view as this is just for a test purchase.

Note, if your provide another name as a first parameter, the mail won’t be sent. First parameter is a view. So, it should be a view available in your laravel project.

// 1
php artisan tinker

// 2
Mail::send('welcome', [], function($message) { $message->to('[email protected]')->subject('Testing mails '); });

Thank you

I hope you liked it 😎.

Leave a Reply

santoshm