Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
On Linux when I want to execute some file and use relative path.
For example I want to do something like this:
cd c:\windows
c:\windows>./System32/ipconfig.exe
However what I get is an error message telling me that "." has not been found.
A period denotes the current directory in Windows.
For your example you would use the following:
c:\> cd c:\windows
c:\Windows> .\System32\ipconfig.exe
Alternately, you could forego the .\ and do it like this:
c:\Windows> System32\ipconfig.exe
Use the correct slash marks and you should be good. Windows uses backslashes as the directory symbol instead of the forward slash.
The only caveat to this is if you have to change drive letters. The cd command will change the working directory, but not the drive. To change drives use [drive letter][colon]:
C:\Windows>cd P:\XenApp\Utils
C:\Windows>P:
P:\XenApp\Utils>
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
A badly-written script created a directory named '--' (including the single quotes) in my home directory.
When I cd to that directory, I am brought back to my home directory.
I'd like to remove that item, but cannot figure out how to do it. Escaping some or all of the characters in the directory name, returns No such file or directory.
rmdir \'--\' should do the trick
simply type the following:
rm -rf \'--
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I'm currently connected to a remote computer running on Linux and I have a random directory that arose after running one of my C programs. The directory name is of this form: 'H$'204'blahblah''u$'[]'$'234', very strange.
When I try to remove it via rm dir_name the terminal spits out Illegal variable name. The same behavior arises even when I use the -f flag. Then I attempted to remove it by clicking on the directory in the explorer (on vscode) and I get an error saying Error: ENOENT: no such file or directory.
I'm running this on csh shell if that helps.
Update: Running: rm ./H<tab> worked. Thanks to Jamie Guinan!
The magic word is ls -b. It will display non printable characters in an escaped way, so that you will be able to enter them back.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
After finishing work on a Python file, I renamed it and it disappeared form Desktop, where it was saved. The new name starts with a dot (.).
What happened to it and how can I get it back?
If the name of a file or a directory starts with a dot, Linux considers it hidden. If your file was on the desktop, it’s most likely still there.
Open terminal and run:
cd ~/Desktop
ls -la
You should see your file on the list. Run:
mv old_filename new_filename
to rename it to something that does not start with a dot.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
Suppose I have a directory on my disk that has the name: photos_with_my_friend_John_from_first_semester_of_my_graduation_year
Now each time I want to enter this directory I must write the following command:
cd photos_with_my_friend_John_from_first_semester_of_my_graduation_year
I am new to linux and for me it is very boring to write this whole name each time I want to deal with this directory or any other directory or file that has such a long name. So is there an alternative easy way to do this?
Most shells offer tab completion: You simply type cd phot and hit Tab, and it'll insert the rest for you (assuming the prefix is unique).
How about using wildcards? Say photos*John*graduation etc.?
You can create a symbolic link for ease of access:
ln -s long_file_name short_file_name
then you can use short_file_name as you wish.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
A very basic question here..
I have an executable redis-server at /home/dave/redis/src. Usually I cd /home/dave/redis/src then ./redis-server to execute it.
How can I call redis-server in the path? something like /home/dave/redis/src./redis-server
Thank you
You almost got it right. Except for the . (dot).
Instead of
/home/dave/redis/src./redis-server
Do
/home/dave/redis/src/redis-server
It is called an absolute path to the file, and it is simply the directories+file names, seperated by / (with a leading /, to make it absolute), so the . does not belong there.
/home/dave/redis/src/./redis-server
Use a dot in front of the first slash.
For example, if I want to open netbeans from the executable in /home/jason/IDE/netbeans/bin/netbeans,
I just put a dot in front of /home/.../.../ and the executable starts.