+ Post New Thread
Results 1 to 4 of 4
*nix Thread, What are some time-saving tips that every Linux user should know? in Technical; Linux: What are some time-saving tips that every Linux user should know? - Quora bash-fu...
  1. #1
    somabc's Avatar
    Join Date
    Oct 2007
    Location
    London
    Posts
    2,337
    Thank Post
    83
    Thanked 388 Times in 258 Posts
    Rep Power
    112

    What are some time-saving tips that every Linux user should know?

    Last edited by somabc; 24th March 2011 at 11:58 AM.

  2. #2

    Join Date
    Jan 2009
    Location
    upstate New York
    Posts
    23
    Thank Post
    0
    Thanked 12 Times in 7 Posts
    Rep Power
    14

    Tips - tar thru ssh to copy directorys from server to server

    tar -zcvf - some_directory | ssh some_user@some_host 'cat > some_destination_file_path.tgz'

    Tars, compresses, and copies a directory across servers in one step.
    There are a number of variations on this command set, I use this one to illustrate the power of SSH since I think it's reasonably straightforward for less-experienced users to understand and adapt to their needs.

    Rsync can do it even better, but this forms an encrypted tunnel.

  3. #3


    Join Date
    Dec 2005
    Location
    In the server room, with the lead pipe.
    Posts
    4,714
    Thank Post
    288
    Thanked 788 Times in 615 Posts
    Rep Power
    226
    Tip 01 Incrementally searchable bash history

    create (or edit) your ~/.inputrc

    Code:
    "\e[A": history-search-backward
    "\e[B": history-search-forward
    "\e[C": forward-char
    "\e[D": backward-char
    edit ~/.bashrc and bump up your command history retention.
    Code:
    export HISTSIZE=1000000
    export HISTFILESIZE=1000000000
    Upon reloading the console session, you can start typing, hit the up arrow key and incrementally search your command history.

    Tip 02 Need to give someone quick access to a file on a local network?

    Code:
    python -m SimpleHTTPServer
    will serve the current directory tree at http://HOSTNAME:8000

    Tip 03 Human readable top-level space usage

    alias du -h --max-depth=1 to "duh"

    Tip 04 Logging what you did to make 'X' work

    Code:
    script whatidid.log
    Logs all commands typed to whatidid.log. Use Ctrl +D to end

    Tip 05 (For herding larg-ish amounts of servers)

    Use something like Puppet (Puppet Labs: The Leading Open Source Data Center Automation Solution) and SVN (or rcs of choice) to make it easy to provision servers and maintain configs.

    Edit: Look here too http://www.commandlinefu.com/commands/browse BUT be aware there's some daft things posted occasionally so work out what a command does before you use it in production.
    Last edited by pete; 29th March 2011 at 07:02 PM.

  4. 2 Thanks to pete:

    jinnantonnixx (3rd April 2011), powdarrmonkey (29th March 2011)

  5. #4
    somabc's Avatar
    Join Date
    Oct 2007
    Location
    London
    Posts
    2,337
    Thank Post
    83
    Thanked 388 Times in 258 Posts
    Rep Power
    112
    If you administer any Linux systems I really recommend Unix and Linux System Administration Handbook: Amazon.co.uk: Evi Nemeth, Garth Snyder, Trent R. Hein, Ben Whaley: Books

    This book approaches system administration in a practical way and is an invaluable reference for both new administrators and experienced professionals. It details best practices for every facet of system administration, including storage management, network design and administration, email, web hosting, scripting, software configuration management, performance analysis, Windows interoperability, virtualization, DNS, security, management of IT service organizations, and much more. UNIX® and Linux® System Administration Handbook, Fourth Edition, reflects the current versions of these operating systems:

    Ubuntu® Linux
    openSUSE® Linux
    Red Hat® Enterprise Linux®
    Oracle America® Solaris™ (formerly Sun Solaris)
    HP HP-UX®
    IBM AIX®



SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 30
    Last Post: 6th June 2011, 04:27 PM
  2. Replies: 9
    Last Post: 26th January 2010, 03:52 PM
  3. Tips for first time fathers
    By ZeroHour in forum Jokes/Interweb Things
    Replies: 32
    Last Post: 18th February 2008, 10:27 AM
  4. Power Saving for Linux (EEEPC)
    By tom_newton in forum *nix
    Replies: 0
    Last Post: 15th January 2008, 12:36 PM
  5. Tips For Going Over To Linux.
    By tickmike in forum *nix
    Replies: 13
    Last Post: 22nd September 2006, 11:32 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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