filesystem type: du -T, lsblck -f

Submitted by cesarito on Tue, 02/21/2017 - 07:38

To identify the filesystem in use we can use the following command:

#using Disk Usage
du -T #T for type
#will returns the filesystem hosting the files we're running du against

lsblk -f
#is equivalent to lsblk −o NAME,FSTYPE,LABEL,UUID,MOUNTPOINT
#and will return information regarding all the disks we could use.

The lsblk command queries the sysfs kernel filesystem for more information please read:

folder : space management

Submitted by cesarito on Tue, 02/21/2017 - 07:28

"ls -la"returns the same 4096 Ko size for each folder. This is because a Unix folder is in fact a file containing file names, and 4096 is the size of a filesystem block. Therefore, if we want to check the size used by all the files and folders of a directory we have to use the "du" command

#disk usage command
du -s folder_name
#make it human redeable
du -sh folder name

For more information regarding Unix filesystem please read : http://www.niceshoes.be/node/16

Putty, Linux openSSH key conversion

Submitted by cesarito on Tue, 02/14/2017 - 10:36

A Putty key encrypted in the Putty ppk format needs to be decoded, before it can be be use on a Linux machine.

#install the putty with apt or any other package manager
sudo apt-get install putty 
#copy you ppk file to the server 
#convert the keys: private and public
puttygen putty_encrypted_key.ppk -O private-openssh -o id_rsa
puttygen putty_encrypted_key.ppk -O public-openssh -o id_rsa.pub
# put them in the .ssh folder
 

 

Tags

Display the content of an article inside a block using views and fields

Submitted by cesarito on Mon, 02/13/2017 - 10:32

This is an alternative solution to node-as-block modules. No code required.

Assumption:  You created a page or an article and its content has at least one tag. We'll use that tag as a filter to find the page.

Create a view:

Manage/Strucuture/Views

+Add view

Give it a name

Select 'show: Content'

Add  the tag you need to find the matching article

In block settings : "Create a block"

Save !

In the next page you can set the fields : trade title for body

Done ;-)

 

 

 

Tags

VI, tricks

Submitted by cesarito on Fri, 02/10/2017 - 13:55
  • cancel all file modifications : 

:edit!

  • blank all the lines :

:1,$d

explanation ":" switch to command mode, "1,$" from line 1 to the last one "d" delete.

Tags