Computer Science Web
Sunday, August 28, 2016
Saturday, May 9, 2015
Saturday, November 1, 2014
Sunday, July 27, 2014
Display size of all subdirectories from current directory in Linux
To display the size the command is "du".
du
You could check the man page and help for the command, a useful modifier is "-h", which as in the "ls" command it converts the size to a more practical representation.
du -h
Show and display human readable size in files and directories listing on Linux
"h" is the ls modifier required to display GB, MB, KB and related information.
ls -lh
ls -lah
ls -lh
ls -lah
Sunday, November 10, 2013
Python str bracket format summary
Number | Format | Output | Description |
3.1415926 | {:.2f} | 3.14 | 2 decimal places |
3.1415926 | {:+.2f} | 3.14 | 2 decimal places with sign |
-1 | {:+.2f} | -1 | 2 decimal places with sign |
2.71828 | {:.0f} | 3 | No decimal places |
5 | {:0>2d} | 5 | Pad number with zeros (left padding, width 2) |
5 | {:x<4d} | 5xxx | Pad number with x’s (right padding, width 4) |
10 | {:x<4d} | 10xx | Pad number with x’s (right padding, width 4) |
1000000 | {:,} | 1,000,000 | Number format with comma separator |
0.25 | {:.2%} | 25.00% | Format percentage |
1000000000 | {:.2e} | 1.00E+09 | Exponent notation |
13 | {:10d} | 13 | Right aligned (default, width 10) |
13 | {:<10d} | 13 | Left aligned (width 10) |
13 | {:^10d} | 13 | Center aligned (width 10) |
Tuesday, August 13, 2013
Installing Oracle JDK JRE on Debian / Ubuntu
To install it, you just need to execute the following commands in order. I am assuming a new clean installation.
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
Subscribe to:
Posts (Atom)