Cygwin - setting up $PATH [closed] - linux

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I've found it's really difficult to setup path variable. I've tried a lot of combinations but nothing works at all. My over 1h work results are but as you see on screenshot (http://puu.sh/33n0X.png )
echo $PATH
give strange directory and
rm -rf k.txt
doesn't work at all. Does anyone has idea what is wrong there? I'm totally confused about it

If you want something a little more "normal", you can suppress the current PATH being appended, and just build your own.
In your ~/.bash_profile, put something to this effect
PATH=/bin
and if you want System32 you can add it as well
PATH=/bin:${TMP%U*}windows/system32
Example

Related

store a variable in linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
I was trying to create variables in my bash shell which I could use whenever I wanted. More specifically, I wanted to create a variable which could store the path to a folder, example:
mypath = `pwd`
However, I can't do the following:
cd $mypath
How can I resolve this? Also, I want to store this variable so I can use after I restart my system. Do I store this in the .bashrc file?
Don't use spaces in assignment, ie
mypath=`pwd`
Furthermore, if you want your variables to be globally available you can use the export command. Example: export mypath="pwd".
If you want the variables to persist after reboot, then you do need to add it to ~/.bashrc.
You can do this with nano ~/.bashrc and adding export mypath="pwd" to the end of the file

Creating a link to an application? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
Would like to do this: Make terminal command do the same like lxterminal.
So I think i will need to create a link to it.
ln -s lxterminal terminal
this doesnt work, maybe I need to trace where the lxterminal is, but how?
You have (at least) two options.
Create a symbolic link:
ln -s $(which lxterminal) /path/to/terminal
Create an alias:
alias terminal='lxterminal'
Both options make the assumption that lxterminal is in your ${PATH}.
The symbolic link approach requires write access to the placeholder "/path/to" (${HOME}/bin or some such) and for this to be in your ${PATH} too. This is the more robust solution, but the alias may suffice if you just want to save typing at the prompt.

Bulk multi rename tool [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I need a live multi rename tool.
The one you can find in double commander, or even better total commander.
The best I could find is renameutils,
which lists all the files and let me edit them in my favorite text editor,
but nothing beats something which is designed to be specifically used to rename.
Is there such a program?
Has to be live and interactive - I have to see the edits I'm doing before hitting the "OK" key.
Has to be in the command line - ncurses, slang, shell. Just not GUI.
Edit:
It's probably doesn't belong here, but super-user:)
Answers would still be welcome.
How about RenameWand? http://renamewand.sourceforge.net/
But you indeed should have tried superuser instead: https://superuser.com/questions/25378/mass-renaming-nix-version

Change hostname on SSH session [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
When I SSH into my server, it has a really long name
user#this-is-a-really-really-really-really-long-server-name:~$
How can I change this to
user#short-name:~$
I'm not sure what to even google for.
Like Matt said. There is similar question on Unix.stackexchange
And you find some Background
here
Modify PS11
PS1="touch me : "
question is if you want to really change the hostname of the server, or only whats displayed at the beginning of the cli.
if you want to change the hostname, you better check specifically for your distribution.
if you only want to change what's displayed at the beginning of the cli, alter the ${PS1} variable via ~/.bashrc (user specific) or /etc/profile (global) or something like that.

What are circular symlinks in Unix-like systems used for? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I was browsing a directory on a Linux machine, and when doing a detailed listing I noticed that a link is pointing to itself, for example:
somelink -> /path/to/directory/somelink
I am wondering what is the reason for doing such a thing?
If the somelink is in /path/to/directory then this is an invalid symlink. If you try to access it, the filesystem will give you an error (probably something like too many levels of symbolic links*). It could have been a typo (or some other mistake) when it was created, or the symlink got moved somehow and ended up linking to itself.
There's no good reason for a circular symlink. Most probably, it was created by accident.

Resources