Welcome To Snipplr


Everyone's Recent Snippets Tagged linux



« Prev 1 2 3 4 5 ... 8
  1. FAV

    C Program to read mouse in console via GPM

    Install GPM using installer such as apt or dnf All you have to do is save code with mouse.c file name and compile it : gcc -o mouse mouse.c -lgpm and you got a "mouse" program that executes l.sh on left, r.sh on right and m.sh on middle mouse...
    Pascal 3 views posted 2 years ago by xyzeugene
  2. FAV

    Clear buffer cache on GNU/Linux systems

    Clear buffer cache on GNU/Linux systems
    Bash 8 views posted 3 years ago by rm1984
  3. FAV

    rsync example to sync between two computers

    Bash 5 views posted 4 years ago by jlmarks
  4. FAV

    Callback Script for Back In Time

    There is a user-callback example in http://bazaar.launchpad.net/~bit-team/backintime/user-callback/view/head:/user-callback.apt-backup which will backup all package selections, sources and repository keys which are necessary to reinstall exactly the...
    Bash 6 views posted 5 years ago by garretjames
  5. FAV

    Remove Old Kernel Versions

    Snippet found on forums to clean up /boot when too many kernels are installed. Though I think the script may need tweaking. Use at own risk!
    Bash 4 views posted 5 years ago by garretjames
  6. FAV

    Replace /dev/sda with /dev/sdb device name assignment

    this can obviously be easily adapted to any other device names. Some commands in here are redundant but all together are more likely to work.
    Bash saved by 1 person 6 views posted 5 years ago by blackthorne
  7. FAV

    copy remote file to local machine

    -r recursively copies files and folders
    Bash 7 views posted 5 years ago by oxnard
  8. FAV

    Ensure string ends with a /

    Bash 3 views posted 5 years ago by jlmarks
  9. FAV

    Finding out ALSA devices

    This script finds out ALSA devices in Linux programatically, which can be a bit tricky.
    C 4 views posted 6 years ago by Makistos
  10. FAV

    Reading sysfs devices in Linux

    This code will print out all sysfs devices under a certain device class (which is supplied as a parameter).
    C 4 views posted 6 years ago by Makistos
  11. FAV

    sdiff - show difference between local file and remote file side by side

    This is a good way to show the difference between files side by side to quickly see what parts are not the same, if any.
    Bash 7 views posted 6 years ago by donkeykong
  12. FAV

    Disabling Telnet in Linux

    The telnet is insecure and unencrypted protocol. The use of this unencrypted protocol could allow users to sniff network traffic and to steal sensitive information like username and password.
    Other 5 views posted 6 years ago by danielt72
  13. FAV

    Create vHost with user and MySQL database

    With this script a new user gets created and gets his own VirtualHost and database. The username is used for building the domain, so the username "test" leads to the domain test.local. The password for the MySQL account used for creating the datab...
    Bash saved by 4 people 4 views posted 6 years ago by derbenni
  14. FAV

    Remove Unneeded Linux Kernels in Ubuntu

    Remove Unneeded Linux Kernels in Ubuntu
    Bash 3 views posted 6 years ago by oxnard
  15. FAV

    Use a proxy with ssh/scp on Linux

    In order to use a proxy by default for your network-based commands, create the file "~/.ssh/config" and give it these properties. Replace "proxyhost" with the hostname/IP of the proxy server and "80" with the port of the proxy server.
    Bash 3 views posted 6 years ago by deanhouseholder
  16. FAV

    host email off server linux commands

    see source
    Bash 5 views posted 6 years ago by bitsculptor
  17. FAV

    CRUD shell script for Bash

    Shell script written in bash which displays a menu giving the you ability to add, edit, modify, and delete users.
    Bash saved by 3 people 20 views posted 6 years ago by dego89
  18. FAV

    Customized Sexy Bash Prompt - Git branch/Status

    customized version of Sexy Bash Prompt
    Bash saved by 3 people 12 views posted 7 years ago by oxnard
  19. FAV

    Installing Lamp on Ubuntu

    This method utilizes tasksel
    Bash 2 views posted 7 years ago by bitfed
  20. FAV

    Sprockets JavaScript dependency management tool using clean RVM

    Use this snippet in Linux shell to install RVM and set it up for use with Sprockets.
    Bash 4 views posted 7 years ago by symsec
  21. FAV

    Correct Number of Parameters

    Tests whether the script has been invoked with the correct number of parameters.
    Bash 1 views posted 7 years ago by triffel
  22. FAV

    Recurisvely sort files by file size

    If you only want to show directories, replace "-type f" with "-type d".
    Bash 7 views posted 7 years ago by tinytiger
  23. FAV

    Redirect sderr to stdout in bash

    How to redirect stderr to stdout in bash
    Bash 7 views posted 7 years ago by tinytiger
  24. FAV

    Delete many files on linux

    A fast way to delete many files without getting an 'Argument list too long' error as wold be the case with 'rm'.
    Bash 7 views posted 7 years ago by tinytiger
  25. FAV

    Linux backup script using rsync and hard-links

    This script will do a daily backup of directories. If the files has not changed then it creates a hard-link to the file. If the file has changed then it will copy the new file. The backup is not much larger than the directories being backed up.
    Bash saved by 2 people 7 views posted 7 years ago by _reydin_
  26. FAV

    Recursively remove .svn folders

    Bash 3 views posted 8 years ago by docdarksidedevcom
  27. FAV

    Check CentOS version from SSH

    Check the version of CentOS
    Bash 5 views posted 8 years ago by klovera
  28. FAV

    Chown all folders 755, files 644 in Linux

    Sets the permissions for all folders to 755, and for all files 644. Useful for SUPHP configurations which required this specific permission setup.
    Bash 6 views posted 8 years ago by axertion
  29. FAV

    Easy single line LAMP installation

    One-line code for installing LAMP server for Ubuntu OS.
    Other 3 views posted 8 years ago by ninacess
  30. FAV

    tar excluding directory

    How to run a tar archive backup excluding a directory. For example, running a website root directory backup excluding the 'backups' directory.
    Bash saved by 2 people 6 views posted 8 years ago by klovera
« Prev 1 2 3 4 5 ... 8