What is the file dead.letter in my home folder?
Answer:
The file dead.letter is usually created by mail client such as /usr/bin/mail, when you abort the message being sent, a copy of the message will be saved in your home folder: dead.letter.
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
What is the file dead.letter in my home folder?
Answer:
The file dead.letter is usually created by mail client such as /usr/bin/mail, when you abort the message being sent, a copy of the message will be saved in your home folder: dead.letter.
Add a user that can gain root privileges in Ubuntu
Answer:
You have created a user, and now you want to make this user (e.g. peter as an example) can gain root privileges.
Firstly, check your /etc/sudoers file
# sudo cat /etc/sudoers
You might found the following lines
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
john ALL=(ALL) ALL
Method 1
If you have the line %admin ALL=(ALL) ALL, then you can add the user (e.g peter) to the admin group using the command:
# sudo usermod -g admin peter
Method 2
Or you can edit the file /etc/sudoers to add your account manually
# sudo visudo
Append peter ALL=(ALL) ALL at the end..
%admin ALL=(ALL) ALL
john ALL=(ALL) ALL
peter ALL=(ALL) ALL
Moving around with Bash short-cut
Answer:
Bash has some shortcuts that allow you to move around the command prompt
1. Ctrl + a
Just to the start of the current line.
2. Ctrl + e
Just to the endof the current line.
Repeat previous command in Bash
Answer:
It is easy to type !! when you want to repeat the previous executed command in Bash
# ls -l /var/log/messages
-rw-r----- 1 syslog adm 330 Mar 29 17:17 /var/log/messages
# !!
ls -l /var/log/messages
-rw-r----- 1 syslog adm 330 Mar 29 17:17 /var/log/messages
Send the crontab result to email
Answer:
To send the crontab's result to email, follow the method below.
# crontab -e
Then add the line at the beginning
Save the crontab.