Where does the file ''$'\033\033\033' come from in Linux? [closed] - bash

Closed. This question is not about programming or software development. 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 11 days ago.
Improve this question
In my directory at a Linux server I have discovered a file with such a strange name.
From the command history I can track that it was probably created by this command:
sudo docker logs <container_id> -n 200000 | less
I suspect I have entered some combination of letters in less (probably starting with s to save a file).
Do you know what exactly has happened?
P.S. If you want to remove such a file, see How to escape the escape character in bash?

I have discovered that such a file is created when you type s in a piped less and then you are asked to enter the log file name. If you type triple Escape and then Enter, you will get such a file.
The command s is actually helpful to save the contents of a piped less.

Related

Windows: File List with Wildcard in filename [closed]

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
Anyone can explain to me why? From the screen shot, you can see I have some csv file in the current directory. The command: dir .csv or dir ".csv" is not working correctly. However, anything like: dir **.csv, dir ?*.csv, dir .csv are working. All of them can list the files I am looking for. Why?
In case you are unfamiliar with what dxiv is talking about. Aliasing in PowerShell is when you essentially give a command a nickname. In PowerShell there is no such command as dir, it's only an alias for the command Get-ChildItem.
The documentation for that command is here:
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-childitem?view=powershell-7.1
If you read through, you'll see that you need to specify a wildcard as a stand-in for the filename before passing the extension.
Generally speaking, the reason you need wildcards for things is to tell the language you're using that there should be something before it. By typing .csv you are searching for files that are literally called '.csv'. No more, no less. The wildcard in *.csv says that it should look for anything ending with '.csv'.

Mac OS: shell not recognising scp [closed]

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 5 years ago.
Improve this question
I'm trying to execute the below command on my new MacBook and was getting the '-bash: sudo scp: command not found' error.
Please help me fixing this issue.
sudo scp -i Pem_File_Name.pem PHP_File_Name.php centos#Host_Path:/var/www/html/Folder_Name/
The Pen_File_Name, PHP_File_Name and Host_Path are replaced with their respected values.
Thanks in advance.
Geeth.
From the error, I'd guess that you have something other than a normal space (maybe a non-breaking space) between "sudo" and "scp". The reason I think this is that the error message says the command "sudo scp" was not found -- but the command should be "sudo" (which should then run "scp" as a separate command). This means that for some reason bash is treating "sudo scp" as a single word instead of two.

hidden autosave file error: no such file or directory [closed]

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
I was editing an emacs file abc, and prior to saving, had a crash. There is now a file .#abc, and I would like to find out what is in that file, to perhaps recover what I was working on.
I know the file is there because when I type
ls -a
it lists
.#abc
However, when I type
more ".#abc"
or simply
more .#abc
I get the error
.#abc: No such file or directory
The same error occurs with cp in place of more.
How do I see what is in that file? Why does ls list it and then other commands can't find the file?
(Is .#abc actually an alias file? If so, how would I know that? And how, nevertheless, do I see the content of it, even if this is only what it is an alias to?)
[Note: I do not want to use emacs to try to find out what is in the file or restore it, because the situation is somewhat more complicated than described: the above is all occurring inside a Time Machine backup, which I need to access because of an emacs autosave overwrite problem on the primary file. I don't want to have the same problem occur on the backup of the autosave file!]
This is all on Mac OS10.8.4.
Whereas autosave files use a tilde ~, lock-files use a dot number-sign .#:
http://www.gnu.org/software/emacs/manual/html_node/elisp/File-Locks.html
Creation of lock-files can be disabled with the following setting:
(setq create-lockfiles nil)
https://stackoverflow.com/a/12974060/2112489

Arrow-UP key history in terminal [closed]

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 8 years ago.
Improve this question
In interactive terminal tools we have Arrow-UP key function to display the history of commands.Even if we
close the tool and re-open the history remains.
But how do they do it, it should be saved some where
to get it back . can we access the file or is it specific to the terminal tool.Or thereis some other thing invloved?
In bash, .bash_history is a file which stores the commands history. HISTFILE variable stores the location of command history file(aka .bash_history).
$ echo $HISTFILE
/home/avinash/.bash_history
So the .bash_history file is stored in my /home/$USER (or ~) directory.
Bash stores a .bash_history file. Most other shells do a similar thing.
Depending on the shell/shell-options you are using the file is located in different places.
For example when you use bash the information/history is saved in ~/.bash_history.

Mac / Unix: overwritten path variable [closed]

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
I was starting to type the command export PATH=/newPathAddition:$PATH I think I must have copied in a newline when copying the newPathAddition to paste into the command, because it ran export PATH=/newPathAddition. I know I can manually add things to the path variable, but is there any way to restore it to what it used to be, or find out information about which directories were in the path beforehand? I really don't want to be in a situation in the future where all these commands aren't working on my computer because things vanished from the path that I don't remember.
These changes are local to this one command prompt. Just open another terminal window.
If you need the normal value of $PATH to use in this one specific terminal window, open another one and copy its $PATH value.
If you want changes to $PATH to persist, you need to write a .bashrc file or a .profile file in your home folder with the $PATH-altering commands you wish to use. To revert, take them out.

Resources