Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Favorite Unusual Command

  1. #1
    Join Date
    Apr 2007
    Location
    Redmond, WA
    Beans
    1,371
    Distro
    Ubuntu 8.04 Hardy Heron

    Favorite Unusual Command

    Do you have a command that is unusual that most users are unaware of or one that is used in an unusual way. Post any strange tips and tricks. Maybe it is a couple of commands put together. Just anything that is cool that others might find handy, I will start.

    Code:
    chattr -i file
    Chattr with the -i switch sets an immutable bit. These are attributes to be added to the existing attributes of the files. A file with the ‘i’ attribute cannot be modified, it cannot be deleted or renamed,

    Code:
    lsattr file
    Lsattr displays the chattr permissions.

    Post'em.
    Last edited by wormser; March 12th, 2008 at 01:24 AM.

  2. #2
    Join Date
    Jul 2007
    Location
    /earth/USA/WA/Spokane
    Beans
    299
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Favorite Unusual Command

    Code:
    free -m
    It shows the ram usage.
    Ubuntu User # 17031
    Quote Originally Posted by RAV TUX View Post
    who needs support when you use Linux.
    Quote Originally Posted by asjdfwejqrfjcvm msz34rq33 View Post
    Open-Source: The power to create completely useless, but extremely cool, programs.

  3. #3
    Join Date
    Jan 2007
    Beans
    Hidden!

    Re: Favorite Unusual Command

    [hallvor@localhost ~]$ df
    Filesystem Size Used Avail Use% Mounted on
    /dev/hdb1 11G 3,8G 6,1G 39% /
    /dev/hdb3 101G 72G 25G 75% /mnt/hdb3
    /dev/sda1 230G 92G 127G 43% /mnt/sda1
    [hallvor@localhost ~]$

  4. #4
    Join Date
    Jun 2006
    Location
    Caracas, Venezuela
    Beans
    418
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Favorite Unusual Command

    I don't think these are unusual or something, but are interesting (at least to me):

    Code:
    history
    history | grep -i <some piece of some command you forgot>
    As many of you surely know, the history command displays the last nn commands used. If you remember a part of a command you want to use now, but you don't remember the whole command with its arguments, etc., you can type the last command I typed before and it will give you the command.

    Also:

    Code:
    !command_name
    Will execute the last command_name used with all it's arguments (useful when you want to use a command used before, which has a long piece of arguments, pipes, etc. Also usefull for repetitive tasks).

    Code:
    tail -f some_file
    The tail command shows the last 10 lines of a file (although I think you can tell it to show more (or less) lines). The -f option leaves the file opened as it grows (useful to monitor log files quickly as they grow).

    And so on. I'm sure there are lots of useful and unusual commands few people know about

  5. #5
    Join Date
    May 2007
    Beans
    7,032
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Favorite Unusual Command

    Useful:
    Code:
    du /path/to/dir
    Summarizes the total disk space usage of the target directory.

    Unusual:
    Code:
    kdontchangethehostname
    Informs KDE about hostname changes.
    I am aware of all internet traditions. | Getting the best help | Text formatting codes | My last.fm profile
    Should I PM support questions? NO!

  6. #6
    Join Date
    May 2007
    Location
    California, USA
    Beans
    245

    Re: Favorite Unusual Command

    I don't know how unusual this is, but I certainly use variations on it a lot. Let's say i'm running sidux and I want to remove all metapackages associated with the name "sidux-686"

    Code:
    dpkg -l  | egrep *sidux-686 | cut -c 8- | cut -c -43 | xargs sudo dpkg -P
    I'm old-fashioned.

  7. #7
    Join Date
    Feb 2007
    Location
    Brampton, Ontario
    Beans
    883

    Re: Favorite Unusual Command

    Dunno if unusual, but sometimes if I know the full objective I'll just put everything on one line:

    Code:
    cd Desktop && tar cjf stuff.tar files && mv stuff.tar /media/backup && cd /media/backup && rsync -avz stuff.tar host@sshserver:backup/
    Hitting the "&&" feels almost like a beat, keepin' that CLI rhythm goin'
    "For those who believe, no explanation is necessary. For those who do not, none will suffice." - Joseph Dunninger

  8. #8
    Join Date
    May 2006
    Location
    Sweden
    Beans
    Hidden!

    Re: Favorite Unusual Command

    Code:
    ls -d */
    It displays the directories contained in the current directory. Not that obvious and very useful.

  9. #9
    Join Date
    Feb 2007
    Beans
    521
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Favorite Unusual Command

    It's not installed by default, but
    Code:
    sl
    Try it also with these args: -a -l
    make install - not war!

    Oh hai!

  10. #10
    Join Date
    Jan 2008
    Beans
    4,309

    Re: Favorite Unusual Command

    I am famous for mentioning this one.
    Code:
    espeak "what you wanna say"

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •