'Linux' Category

  • Convert file system to ext4

    May 21, 2022
    1 Convert the filesystem to ext4 Run the following command to convert from ext2 to ext4: tune2fs -O extents,uninit_bg,dir_index,has_journal /dev/sda1 For converting from ext3 to ext4, run the command: tune2fs -O extents,uninit_bg,dir_index /dev/sda1 2. Check the filesystem for errors e2fsck -pf /dev/sda1 3. Mount the filesystem mount -t ext4 /dev/sda1 /mnt You can check /mnt […]
  • How to delete mailq list with exim ?

    March 25, 2019
    exim -bp | exiqgrep -i | xargs exim -Mrm
  • RPI vcgencmd usage

    March 25, 2019
    Verified commands Command outputs are from firmware version 362371. vcgencmd command Shows a list of possible commands. root@raspberrypi:~# vcgencmd commands commands=”vcos, ap_output_control, ap_output_post_processing, vchi_test_init, vchi_test_exit, pm_set_policy, pm_get_status, pm_show_stats, pm_start_logging, pm_stop_logging, version, commands, set_vll_dir, led_control, set_backlight, set_logging, get_lcd_info, set_bus_arbiter_mode, cache_flush, otp_dump, codec_enabled, measure_clock, measure_volts, measure_temp, get_config, hdmi_ntsc_freqs, render_bar, disk_notify, inuse_notify, sus_suspend, sus_status, sus_is_enabled, sus_stop_test_thread, egl_platform_switch, mem_validate, […]
  • Remove swap on RaspberryPi

    March 25, 2019
    dphys-swapfile swapoff dphys-swapfile uninstall update-rc.d dphys-swapfile remove
  • VIM: Substituting in a visual selection

    March 17, 2016
    The substitute command (:s) applies to whole lines, however the \%V atom will restrict a pattern so that it matches only inside the visual selection. This works with characterwise and blockwise selection (and is not needed with linewise selection). For example, put the cursor on this line: music amuse fuse refuse In normal mode, type […]
  • Raspberry PI Video

    August 5, 2015
    Redirect video with VLC: raspivid -o – -t 99999 -hf -w 400 -h 300 -fps 25|sudo -u nico — cvlc -v – –noaudio –no-sout-audio –sout ‘#standard{access=http,mux=ts,dst=:8090}’ :demux=h264 Redirect video with netcat: while true; do raspivid -w 640 -h 480 -fps 25 -t 99999 -o – | nc -l -p 5001; sleep 1 ; done
  • SMTP, Send email with telnet

    July 29, 2015
    $> telnet localhost smtp Trying 127.0.0.1… Connected to localhost. Escape character is ‘^]’. 220 mailtest ESMTP Postfix (Debian/GNU) $> ehlo example.com 250-my-new-mailserver 250-PIPELINING 250-SIZE 10240000 250-VRFY 250-ETRN 250-ENHANCEDSTATUSCODES 250-8BITMIME 250 DSN $> mail from:<nico@example.com> 250 2.1.0 Ok $> rcpt to:<admin@example.com> 250 2.1.5 Ok $> data 354 End data with <CR><LF>.<CR><LF> $> Hi Admin, $> $> […]
  • Fail2ban secure your server

    July 29, 2015
    Few tips about fail2ban: How to delete or free a blocked ip: fail2ban-client get jail actionunban ipaddress
  • Bash completion

    June 2, 2015
    To prevent (on osx) the symlinks pause when you hit `tab`, add the following to your ~/.inputrc: set mark-symlinked-directories on
  • Complete list of option: hostapd.conf

    May 21, 2015
    Example for hostapd configuration file hostapd.conf See also