linux – Bash: Display each sub-directory size in a list format using 1 line command? – Super User

du -h –max-depth=1


oliver@home:/usr$ sudo du -h --max-depth=1
24M ./include
20M ./sbin
228M ./local
4.0K ./src
520M ./lib
8.0K ./games
1.3G ./share
255M ./bin
2.4G .


If –max-depth=1 is a bit too long for your taste, you can also try using:

du -h -s *

This uses -s (–summarize) and will only print the size of the folder itself by default. By passing all elements in the current working directory (*), it produces similar output as –max-depth=1 would:


oliver@cloud:/usr$ sudo du -h -s *
255M bin
8.0K games
24M include
520M lib
0 lib64
228M local
20M sbin
1.3G share
4.0K src

The difference is subtle. The former approach will display the total size of the current working directory and the total size of all folders that are contained in it… but only up to a depth of 1.

The latter approach will calculate the total size of all passed items individually. Thus, it includes the symlink lib64 in the output, but excludes the hidden items (whose name start with a dot). It also lacks the total size for the current working directory, as that was not passed as an argument.

via linux – Bash: Display each sub-directory size in a list format using 1 line command? – Super User.

How to Find Out What’s Keeping Your Computer from Going to Sleep

So your computer is set to go to sleep after a half hour of inactivity, but the darn thing never actually goes to sleep. Want to figure out what’s keeping it awake? Here’s a quick command for Windows and OS X that’ll let you know.

A lot of things can keep your computer from going to sleep, like downloading a file, opening a file on the network, or even a disconnected printer with an open job. Luckily, both Windows and OS X have an easy method for finding out what the problem is.

For Windows: Go to Start > Programs > Accessories, right-click on Command Prompt, and open it as an administrator. Then type:

powercfg -requests

It’ll let you know if anything is keeping the computer awake. In the screenshot above, for example, it told me that I had a file open in PotPlayer that was preventing my computer from sleeping (since the file resided on the network).

For Mac: go to /Applications/Utilities, open up the Terminal, and type:

pmset -g assertions

It’ll tell you if a device is preventing sleep, and what process that is. Unfortunately, this one seems a little more finicky—some people are having problems where it only tells you that your computer’s being kept awake, but it doesn’t say by what. If you get stuck in that situation, check out Apple’s Help page on the subject. It lists a lot of common possibilities. Hit the link below to read more about each method.

via How to Find Out What’s Keeping Your Computer from Going to Sleep.

email – What is the difference between ports 465 and 587? – Stack Overflow

Ports 465 and 587 are intended for email client to email server communication (sending email).

Port 465 is for smtps – SSL encryption is started automatically before any SMTP level communication.

Port 587 is for msa – it is almost like standard SMTP port. SSL encryption may be started by STARTTLS command at SMTP level if server supports it and your ISP does not modify/filter server’s EHLO reply (reported 2014 Nov).

MSA should accept email after authentication (e.g. after SMTP AUTH). It helps to stop outgoing spam when netmasters of DUL ranges can block outgoing connections to SMTP port.

via email – What is the difference between ports 465 and 587? – Stack Overflow.


VM argument
-Dlog4j.debug=true : VM argument untuk melihat configurasi awal
-Dlog4j.configuration={path to file} : VM argument untuk merubah file configurasi log4j

Total Commander Custom Command

c:\Program Files (x86)\Beyond Compare 3\BCompare.exe 
%Z %P %T
C:\Program Files (x86)\Beyond Compare 3\BCompare.exe
Compare Us

cmd /c
mklink /J %T%N %P%N

/cmd cmd "-new_console:t:%P"
c:\Program Files (x86)\Vim\vim74\gvim.exe
--remote-tab-silent "%P\%N"
C:\Program Files (x86)\Vim\vim74\gvim.exe


c:\Program Files\ConEmu\ConEmu64.exe
/cmd e:\Program Files\PyCmd\PyCmd.exe"-new_console:t:%P"

c:\Program Files\ConEmu\ConEmu64.exe
/cmd E:\CYGWIN_BIN\bin\bash.exe



c:\Program Files\ConEmu\ConEmu64.exe


e:\Program Files\cmder\Cmder.exe
/START %P -new_console:t:%P


c:\Program Files\Everything\Everything.exe
-p "%P"


open_folder_command2=$exec("%TOTALCOMMANDERPATH%\totalcmd64.exe" /O /T "%1") 
open_file_command2=$exec("%TOTALCOMMANDERPATH%\totalcmd64.exe" /O /T /L="%P" "%1")
open_path_command2=$exec("%TOTALCOMMANDERPATH%\totalcmd64.exe" /O /T "$parent(%1)")
c:\Program Files\ConEmu\ConEmu64.exe
/cmd "cmd.exe /s /k clink_x64.exe inject" "-new_console:t:%P"


Remote Lock Unlock Linux from ssh

$ ssh -X user@server “export DISPLAY=:0; gnome-screensaver; gnome-screensaver-command -l;”

You may use that command without “-X” option if you have X forwarding enabled (ForwardX11 yes) on your ssh configuration. But you need to remember with “export DISPLAY=:0”, without this the command will give the lock screen on your computer, not your remote computer.

To unlock the screen on your remote computer, type this command on your computer :

$ ssh -X user@server “export DISPLAY=:0; gnome-screensaver; gnome-screensaver-command -d;”

sumber :

RDP keyboard weirdness..

Jika terjadi keanehan pada komputer remote, semisal sewaktu tekan huruf ‘m’ maka window yang aktif menjadi minimize, jalan keluarnya ada dengan menekan Windows Key + D. Entah kenapa saya juga tidak tahu tapi hal tersebut sangat mengganggu.

sumber :