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.
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 7 months ago.
Improve this question
I have registered some linux machines intro AD with sssd and it works great, but I have an issue with the bash prompt. Some AD usernames start with $ and the prompt refuses to display it, so now I'm left with the string similar to #servername:~$
If I do an export PS1="\$USER#\H" it gets displayed correctly.
Any ideas on how to make bash prompt either escape the special character, or make sssd edit the bashrc with the "correct" format?
This is more of a Linux configuration question and would work better in unix.stackexchange.com or askubuntu, but generally to change default user configuration you'd want to edit the files in /etc/skel.
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 a beginner with bash/linux. I have a program that I have written using Visual Code Studio. I have been able to correctly compile the program and it return the output I was expecting. But I have forgotten the command to take that output and put it into a specific file.
Also, how would I find the pathway for that file, if it's not physically on my computer? I've ssh into a rasp pi on campus. So all the files are on the pi. Could it be as simple as copy paste?
I really think you should go over the basics of remote connection to a Linux machine, but to answer your question:
In order to redirect output from a command line utility (i.e. your program):
./[program_name] &> [output file]
using the &> operator will redirect both stdout and stderr to that file which I assume you want
In order to pull that file from remote:
scp [username]#[server_ip]:/[output file] ./
This assumes you actually have a user on that remote machine that you can ssh into
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 2 years ago.
Improve this question
I have the following challenge under Linux:
An application is writing a config-file "samename.cfg" into certain directories
I want to have the config-file named different for each directory
I do not want any file called "samename.cfg" written to the directories
I can not change it in the application
So I would like to have the application thinking that it accesses samename.cfg but in fact it reads and writes anothername.cfg. Symlink does not help, because then there still is a file called samename.cfg in every directory.
Anybody any idea?
Regards,
Axel
Try using a hard link instead of a soft link when using ln command (just remove the -s flag).
See ln man's page for more details.
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>