Set filename in terminal title in vim
Answer:
To display the currently editing filename in the title of terminal of vim, you can try the tricks below:
1. Press [ESC] to get into command mode
2. Enter :set title
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
Set filename in terminal title in vim
Answer:
To display the currently editing filename in the title of terminal of vim, you can try the tricks below:
1. Press [ESC] to get into command mode
2. Enter :set title
Display the current hard limit of my Linux server
Answer:
The hard limit of your Linux operating system is the maximum server limit that can be set without tuning the kernel parameters in proc file system.
To show it, you can use the ulimit command:
# ulimit -aH
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 20
file size (blocks, -f) unlimited
pending signals (-i) 16382
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) unlimited
cpu time (seconds, -t) unlimited
max user processes (-u) unlimited
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
Disable auto /tmp folder clean up when reboot in Debian/Ubuntu
Answer:
In Debian/Ubuntu, the /tmp folder will be auto cleaned up when computer reboot.
To disable this function, do the thing below:
# sudo vim /etc/default/rcS
Change from:
TMPTIME=0
To:
TMPTIME=1
That's all.
How to grep for tab character(s) in Linux
Answer:
To grep for file contains tab characters, you can execute the command below:
# grep $'\t' input.txt
Display non-printable character in vim
Answer:
To display non-printable characters, such as control characters in vim, you can try the tricks below:
1. Press [ESC] to get into command mode
2. Enter :set list
If you want to turn off the non-printable character, enter :set nolist will revert the option set above.