Results 1 to 6 of 6

Thread: How to use Alias command in Linux

  1. #1
    Join Date
    Nov 2009
    Posts
    955

    How to use Alias command in Linux

    Hi,
    To create some useful shortcuts of ready command line I want to use the alias command. But I had never used this before so I need some information on the same. How use this command and what are the drawbacks of the same. The other thing I need help regarding the shred command. Like I want to transfer my hard drive to some else then can I use the shred command to remove file. Under what conditions are they recoverable.

  2. #2
    Join Date
    May 2008
    Posts
    4,085

    Re: How to use Alias command in Linux

    An alias is a command defined by the user, which will call another command. His interest lies mainly in the possibility to use shortcuts for commands with many options that you use frequently. To use my previous example, the command shred it was necessary to delete a file by rewriting over 50 times and writing zeros before Suppress, enter the following command - shred -uvz -n 50.

  3. #3
    Join Date
    Apr 2008
    Posts
    3,267

    Re: How to use Alias command in Linux

    Thanks to the aliases we will be able to reduce the number of characters to be entered to allow the execution of this command. To create an alias of the shred command with the-n UVZ-50, proceed as follows: alias del=shred shred -uvz -n 50. Here del is now an alias of the command shred with the options specified. ou can test the alias now and see the effect.

  4. #4
    Join Date
    Apr 2008
    Posts
    3,522

    Re: How to use Alias command in Linux

    If you want to use an alias permanently, you must edit the file / etc / bash.bashrc and add your aliases to the end of the file. Otherwise, the alias that you defined live on the console disappear at the end of your session. Some examples of aliases, nstall a program then type command alias upd=apt-get install. Restart the network by alias rebootn=/etc/init.d/networking restart. To mounta drive alias cdrom=mount -t iso9660 /dev/cdrom /mnt/cdrom.

  5. #5
    Join Date
    Apr 2008
    Posts
    3,295

    Re: How to use Alias command in Linux

    Shred commands really destroy your files which are not recoverable. Indeed, it is easy to retrieve files that were deleted, via rm command. Simply because when you delete a file from your hard disk, it is rendered invisible by the system, which will rewrite over when he needs them. However, the file in question is still very much on the disc, and many specialized software will recover all or in part. The solution to protect themselves and ultimately, protect its sensitive content) exists in GNU / Linux through a simple command called shred.

  6. #6
    Join Date
    Nov 2005
    Posts
    3,026

    Re: How to use Alias command in Linux

    Under GNU / Linux, a number of operations must be conducted in the command line. If some commands are easy to remember and type (cd, ls, etc.) is not always a generality. With aliases, it is possible to create custom commands that allow, among other things, reduce the number of characters to be entered to execute an action via the terminal.

Similar Threads

  1. Question about -F Linux Command
    By Tynan in forum Operating Systems
    Replies: 3
    Last Post: 14-01-2011, 04:32 AM
  2. netstat command in Linux
    By Bruno007 in forum Tips & Tweaks
    Replies: 3
    Last Post: 14-09-2010, 07:55 PM
  3. How to use linux dd command
    By Rubeen in forum Operating Systems
    Replies: 5
    Last Post: 02-04-2010, 10:59 AM
  4. Linux history command and fc command
    By Alkesh jain in forum Operating Systems
    Replies: 3
    Last Post: 26-05-2009, 07:53 PM
  5. show the DNS with linux command if possible
    By CLONEOPS in forum Technology & Internet
    Replies: 5
    Last Post: 25-02-2009, 11:39 PM

Tags for this Thread

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
  •  
Page generated in 1,713,950,305.59292 seconds with 17 queries