Questions tagged [tilde]
The tilde tag has no summary.
31 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
-3
votes
1
answer
86
views
Need working examples of using tilde expansion immediately following the : (colon) sign in variable assignment
In the Bash manual, it is written about the tilde expansion:
Each variable assignment is checked for unquoted tilde-prefixes
immediately following a ‘:’ or the first ‘=’.
Read the Bash manual about ...
1
vote
2
answers
133
views
How to find files with find tool in system path ($PATH)? Or alternatively, How to specify starting-point directory for find as an expression?
For example, I want to find all symlinks that reference to particular binary in all directories that belong to system $PATH.
This can be successfully achieved with manual specification of all ...
0
votes
1
answer
60
views
Accents don't work for me in Google Chrome
The accent keys, both normal and the inverted tilde, do not work for me in Google Chrome.
I don't know how to solve it, among other things, I read that some program may be interfering, but I don't ...
1
vote
0
answers
125
views
Incorrect folder name created when using cp command in bash [closed]
I would like to copy a file from one location to another. When I use the cp command in a terminal it works well, for example I use the following command:
cp -r projects/Test/ projects/Personal/
This ...
0
votes
2
answers
86
views
Ubuntu doesn't translate /home/testuser to ~
In Ubuntu 22.04.3 LTS, if I log in with the credentials of the LDAP user testuser, in several different programs the path of the $HOME directory is not replaced by ~ (as instead it happens for local ...
0
votes
1
answer
63
views
Bash script variable syntax: with some commands it works, with others it does not [duplicate]
I do not understand the behaviour of this variable:
SSH_CONFIG_FILE="~/.ssh/config"
echo $SSH_CONFIG_FILE
ls -l $SSH_CONFIG_FILE
ls -l ~/.ssh/config
This is the output:
~/.ssh/config
ls: ...
3
votes
2
answers
3k
views
How does the tilde expansion work within a shell variable?
I came across something funny when testing my script.
I can ls my directory from the shell manually if I run
$ ls ~/db_backups/
test1 test2
$
However, if I assign a shell variable a dir location as ...
1
vote
2
answers
565
views
Tilde not returning home directory
After sudo command to change user, Tilde (~) not returning current user's home directory but returning previous login user's home directory. I needed to expand with echo ~USERNAME but I need to make ...
5
votes
1
answer
1k
views
Tilde expansion vs. variables in Bash
Please, consider the following snippet:
$ export xx=foo
$ sudo bash -c 'echo $xx ~'
/root
Which is ok. We can't see xx.
However, if I expose it:
$ sudo -E bash -c 'echo $xx ~'
foo /home/xropi
Though ...
0
votes
1
answer
73
views
Simple variable assignment: Tilde does not expand in quotes [duplicate]
I have the following expression that is giving an error, but I am unable to figure out the problem.
rcutils_path="~/Admir/bin/gungadin-1.0/rcutils"
# Re-map modifier keys for dvorak ...
6
votes
1
answer
7k
views
Command not found in zsh, but found in bash
I'm using zsh on ubuntu and I created a symlink for bat as so:
ln -s /usr/bin/batcat /home/user_name/.local/bin/bat
hitting ls -l from ~/.local/bin shows:
lrwxrwxrwx 1 tux tux 15 May 19 13:47 ...
0
votes
2
answers
3k
views
How to view ~ (tilde) instead of home directory in bash?
I've changed my home directory from /home/alessandro to /mnt/c/Users/aless/Documents/uni/labcalc (I am using debian in WSL so /mnt/c is C:\ in windows). When I type cd ~ it correctly goes to my new ...
2
votes
0
answers
161
views
Multiple files with the same name and a tilde are written while editing a file with gvim
I am under fedora 29. I edit my files with gvim and since a few days, one of them appears multiple times, renamed with an additional letter and tilde. The directory looks like this :
sf1.pdf sf1....
0
votes
4
answers
2k
views
Where is cd ~ located on Ubuntu?
What is the absolute path of cd ~ on Ubuntu?
Trying to find out where this dir is located?
For example:
/home
3
votes
2
answers
6k
views
The tilde key generates "k", not "~"
I am using an Acer Swift One laptop with Windows 10. The keyboard is a standard German keyboard.
I downloaded bash today from git-scm.com/download/win and tried some commands. For some reason bash ...