:::: MENU ::::

Home

  • May 04 / 2017
  • 0
Linux

Reduce partition size on EXT filesystems on Linux

It is possible to modify a partition size on EXT filesystem thanks to some few commands.

We will take here a simple example:

  • We have a /dev/sda5 partition mounted on /home
  • Its size is currently 150G and we want to reduce it to 100G

Let’s check the current config (mounting point and size):

We need to first unmount the partition:

If you can’t unmount it, double check what process is using it with the lsof command:

Then proceed with a check with e2fsck command and resize the partition with resize2fs by defining the new size (M for Megabytes, G for Gigabytes, and so on…)

Mount your partition back to your system:

And check again your partition sizes :

We can see that the partition /home has now a size of 100G as expected!

Share...Share on Google+Tweet about this on TwitterShare on RedditShare on LinkedInShare on FacebookEmail this to someone
  • Apr 24 / 2017
  • 0
Linux

Find ILO IP on a HP server with Linux

If you forgot what iLO IP has been defined on your linux server and you are working remotely on it, don’t worry, you can still retrieve it with a common tool called ipmitool – available on most of the distros with standard packages:

If you’re getting such an error when you are using the command:

This means you just need to enable some modules before:

Share...Share on Google+Tweet about this on TwitterShare on RedditShare on LinkedInShare on FacebookEmail this to someone
  • Apr 13 / 2017
  • 0
Linux

Quit telnet – Escape character

Stuck with a telnet session that refuses to give you hand back on console?
No worries… You just have to know the correct command to sort this out!

When you are opening a telnet connection, you probably got something like:

So, if you want to quit, you just have to use the “escape character” as indicated. But this character is not designed to be typed with 2 characters like “^” and then “]” – you have to use a direct command that can be different depending on your OS:

  • Windows: Ctrl + $
  • Linux: Ctrl + Alt Gr + ]
  • Mac OS: Ctrl + $

And press Enter once you inserted this escape character so you can get the standard telnet prompt and be able to type quit to exit the prompt.

This will result in a command like:

And here you go – you’re out of telnet 🙂 !

Share...Share on Google+Tweet about this on TwitterShare on RedditShare on LinkedInShare on FacebookEmail this to someone
  • Apr 07 / 2017
  • 0
Linux

Display time with history command

When you are using the history command on a UNIX system, by default, you’re only getting an action list with numbers but no date and/or time to complete this history. For that, you have to define an environment variable HISTTIMEFORMAT that will describe how you want to display the timestamp for each command.

To display the timestamp temporarily (during session), you can just export the variable before sending the command:

You will get:

If you want to keep that display for a future session, you have to add this variable to your bash profile and reload your profile:

Share...Share on Google+Tweet about this on TwitterShare on RedditShare on LinkedInShare on FacebookEmail this to someone
  • Mar 29 / 2017
  • 0
Uncategorized

MonitWeb – Architecture and security

Check instantly your infrastructure health like certificate expiration or unexpected opened ports. Stay updated with daily security feeds and get custom and automated reports.

Need further assistance for designing your architecture or get some security insights for an existing app? Get in touch with experts to get custom and complete assistance!

MonitWeb: https://www.monitweb.com

Share...Share on Google+Tweet about this on TwitterShare on RedditShare on LinkedInShare on FacebookEmail this to someone
  • Mar 24 / 2017
  • 0
Linux

Create multiple symlink by changing name with command find

Let’s imagine that we have the following directory listing:

We would like to get a copy of those files named 2016 with a new name for the 2017 year, but we need to keep same content and retro-compatibility. For that, it’s easier to create some symbolic links of all those files instead of doing copies.

You can so use this command for creating those symlinks:

We are now getting this, as expected:

Share...Share on Google+Tweet about this on TwitterShare on RedditShare on LinkedInShare on FacebookEmail this to someone
Pages:1234567...16
Question ? Contact