Display established TCP connections inside the terminal.
When you want to leave terminal open but force sudo to forget password then enter command:
$ sudo -K
It is very annoying to see message “E212: Can’t open file for writing” when trying to save file.
Hopefully there is a simple solution (a bit longer but without “W12 Warning“):
:execute ':w !sudo tee % > /dev/null' | :edit!
Look at commandlinefu.com for more solutions like :W command below:
:command W :execute ':silent w !sudo tee % > /dev/null' | :edit!
I tend to forget passwords from time to time so I installed KeePassX today. Now I can store them in one place, organize and perform auto type.
[notice] child pid 41292 exit signal Segmentation fault (11)
My Apache and PHP versions:
$ httpd -v Server version: Apache/2.2.15 (Unix) Server built: Dec 8 2011 18:07:26 $ php -v PHP 5.3.3 (cli) (built: Jan 11 2012 19:30:40) Copyright (c) 1997-2010 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
The problem was with eAccelerator PHP module.
There are two simple solutions. First requires to edit /etc/php.d/eaccelerator.ini file and comment out one line:
Second is to remove eAccelerator PHP module:
# rpm -e php-eaccelerator
Don’t forget to restart Apache.
If you don’t look at console output and want to hear that host is reachable then just add -a parameter to ping command (Linux).
$ ping -V ping utility, iputils-sss20101006
$ ping -a 188.8.131.52 PING 184.108.40.206 (220.127.116.11) 56(84) bytes of data. 64 bytes from 18.104.22.168: icmp_req=1 ttl=44 time=38.9 ms (beep) 64 bytes from 22.214.171.124: icmp_req=2 ttl=44 time=39.3 ms (beep) 64 bytes from 126.96.36.199: icmp_req=3 ttl=44 time=39.0 ms (beep) ^C --- 188.8.131.52 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2003ms rtt min/avg/max/mdev = 38.997/39.138/39.346/0.273 ms
Ubiquiti Beta Program provides access to beta versions of AirOS releases.
For this example I will use such tree:
. ├── dir1/ │ ├── dir6/ │ ├── dir7/ │ ├── dir8/ │ ├── file4 │ └── file5 ├── dir2/ │ └── dir9/ │ ├── dir10/ │ │ ├── file9 │ │ └── file10 │ ├── file6 │ ├── file7 │ └── file8 ├── dir3/ ├── dir4/ ├── dir5/ ├── file1 ├── file2 └── file3
List of all files and directories:
$ find . | sort | grep -v ^.$ ./dir1 ./dir1/dir6 ./dir1/dir7 ./dir1/dir8 ./dir1/file4 ./dir1/file5 ./dir2 ./dir2/dir9 ./dir2/dir9/dir10 ./dir2/dir9/dir10/file9 ./dir2/dir9/dir10/file10 ./dir2/dir9/file6 ./dir2/dir9/file7 ./dir2/dir9/file8 ./dir3 ./dir4 ./dir5 ./file1 ./file2 ./file3
Number of all files and directories:
$ find . | grep -v ^.$ | wc -l 20
List of all directories:
$ find . -type d | grep -v ^.$ ./dir3 ./dir5 ./dir1 ./dir1/dir6 ./dir1/dir8 ./dir1/dir7 ./dir2 ./dir2/dir9 ./dir2/dir9/dir10 ./dir4
Count of all directories:
$ find . -type d | grep -v ^.$ |wc -l 10
List of subdirectories in current directory:
$ find . -maxdepth 1 -type d | sort | grep -v ^.$ ./dir1 ./dir2 ./dir3 ./dir4 ./dir5
Count of subdirectories in current directory:
$ find . -maxdepth 1 -type d | grep -v ^.$ | wc -l 5
List of all files:
$ find . -type f | sort ./dir1/file4 ./dir1/file5 ./dir2/dir9/dir10/file9 ./dir2/dir9/dir10/file10 ./dir2/dir9/file6 ./dir2/dir9/file7 ./dir2/dir9/file8 ./file1 ./file2 ./file3
Count of all files:
$ find . -type f | wc -l 10
List of files only in current directory:
$ find . -maxdepth 1 -type f | sort ./file1 ./file2 ./file3
Count of files only in current directory:
$ find . -maxdepth 1 -type f | wc -l 3
Recently I started using Redshift. It is small application that changes color temperature of your screen. It is really good idea as eyes don’t get tired so quickly at night.
Download and run Universal USB Installer as it offers wide range of Linux distributions and easy automatic process.