What does ~ mean in a Linux shell?

3,747

Solution 1

The ~ (tilde) is a quick way of specifying your home directory.

The ~/.somefilename means your home directory, the file .somefilename.

Solution 2

The tilde ~ character is interpreted by most shells as the "home directory" for you. The "." doesn't mean anything if it's part of a filename, although some programs such as ls will (unless explicitely told otherwise) not show files if their name starts with a "dot". Sort of a "hidden" attribute.

Solution 3

Tilde originally shared the same space on the HOME key of certain keyboards and by association still means home directory.

Share:
3,747

Related videos on Youtube

d-_-b
Author by

d-_-b

(your about me is currently blank)

Updated on September 18, 2022

Comments

  • d-_-b
    d-_-b over 1 year

    Afternoon, is there a reason as to why the css attribute -webkit-transition: all .8s ease-in-out;isn't doing what it's supposed to?

    Browser is MS Edge, my code is below.

    Thanks

    Todd

    .callToActionDefault:hover {
        color: white;
        text-decoration: none;
        background: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #0d89ca), color-stop(100%, #0d89ca));
        background: -webkit-linear-gradient(top, #0d89ca 20%, #0d89ca 100%);
        background: linear-gradient(to bottom, #0d89ca 20%, #0d89ca 100%);
    }
    
    .callToActionDefault {
        padding: 8px;
        font-size: 15px;
        margin-top: 20px;
        letter-spacing: 0.5px;
        color: white;
        width: 60%;
        display: block;
        position: relative;
        background: -webkit-gradient(linear, left top, left bottom, color-stop(20%, #219cdd), color-stop(100%, #0d89ca));
        background: -webkit-linear-gradient(top, #219cdd 20%, #0d89ca 100%);
        background: linear-gradient(to bottom, #219cdd 20%, #0d89ca 100%);
        bottom: 0;
        font-weight: 700;
        -webkit-transition: all .8s ease-in-out;
    }
    <a class="callToActionDefault" href="#">This is a button</a>
    • Andrew Breksa
      Andrew Breksa over 11 years
      tilde is the users' home directory
    • pst
      pst over 11 years
      In any case, this is covered in the appropriate shell reference, such as the Bash Reference Manual.
    • Adrian Cornish
      Adrian Cornish over 11 years
      Looks like google does not support it support.google.com/websearch/bin/…
    • sol
      sol over 6 years
      The webkit prefix works for webkit browsers. Edge doesn't use webkit. Use transition without the prefix. Link for more -> shouldiprefix.com/#transitions
  • user473528
    user473528 over 11 years
    I should also mention that the . infront of a file name normally signifies it is a hidden file. It will not show up by default in an ls of a directory unless you specify -a as an option to the ls command.
  • Admin
    Admin over 6 years
    Thank you, no doubt there'll be another "issue" but for the hell of it, lets try it.
  • Angel Politis
    Angel Politis over 6 years
    You're welcome @user8709679. If you use the complete code I have included in my answer, your transition will work in every browser that supports CSS transitions.
  • Admin
    Admin over 6 years
    OK, yes it works perfectly with the background-color attribute but not the background & linear-gradient attributes to CSS. Thanks
  • Angel Politis
    Angel Politis over 6 years
    @user8709679 You're welcome. Please be sure to accept this answer, if it helped, so that other people can find it and be helped in the future.