Category

cmd

  • 02.23.10
    Force fsck at next boot cmd | rafacas | (0)
    # touch /forcefsck Creating an empty forcefsck file in the root directoy will force fsck to run at the next boot.
  • 12.31.09
    Make Love cmd | n0str0m0 | (0)
    In FreeBSD: $ cd /usr/src $ make love Enjoy the output. Merry Christmas! Source: psybermonkey
  • 11.27.09
    Ignoring an alias cmd, shell | rafacas | (3)
    Sometimes I want to ignore an alias. That might seem to make no sense because one of the reasons (the reason?) to use an alias (like ls='ls --color') is creating shortcuts. But, in some cases I need to use the real command, with its real output. In my case, it is because I share the same username with other people on some systems (yes, it is pretty awful, but that is another issue). To do this, precede the command with a backslash: '\'. For example: $ \ls Update: As loood has said in the comments, typing the command in quotes has the same ...
  • 09.22.09
    Listing all service status cmd, shell | rafacas | (0)
    # service --status-all anacron (pid 2435) is running... atd (pid 2405) is running... auditd (pid 1777) is running... Avahi daemon is running cpuspeed is stopped crond (pid 2385) is running... cupsd (pid 2424) is running... dnsmasq is stopped hald (pid 2129) is running... httpd is stopped [...] Runs all init scripts (located in /etc/init.d), in alphabetical order, with the status option. Note: Only in Red Hat and redhat-like distros (Fedora, Mandriva,...).
  • 09.03.09
    Refreshing bash configuration cmd, shell | rafacas | (0)
    After writting some changes in the .bashrc file, you can reload it running this command: $ source ~/.bashrc or the even simpler $ . ~/.bashrc
  • 07.13.09
    OR in grep cmd | rafacas | (0)
    $ egrep "regexp1|regexp2" file1 file2 Search one or more files (file1 and file2 in our example) for lines that match any of several (two in our case) regular expressions: regexp1 OR regexp2. The '|' stands for the OR.
  • 07.10.09
    Adding password protection on a file with vim cmd, security | rafacas | (1)
    $ vim -x filename The -x option uses encryption when writing the file. It will ask for a key: Enter encryption key: ****** Enter same key again: ****** From then on your filename will be encrypted and accessed using the password. The -x option will no longer be necessary when editing the file.
  • 05.18.09
    Vi: emptying a file in one shot cmd | rafacas | (2)
    :1,$d This vi command blanks out the file being edited. Updated: javisantana suggested another way to emptying a file. Type: ggdG in command mode.
  • 05.12.09
    Quick access to the ASCII table cmd | rafacas | (0)
    man ascii Prints octal, hexadecimal and decimal listings of the ASCII character set.
  • 04.17.09
    Showing a computer’s open ports cmd, network | rafacas | (0)
    $ netstat -an | grep -i listen Shows the open ports on all the IPs of the computer the command is run on.