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
I am looking to copy txt file content to clipboard so that I will be able to paste it somewhere else (using MAC terminal). Normally, I am supposed to select the text content and make a copy. That is not convenient in my case since the content is too large too scrolled all the way down. Is there a Linux shortcut that I can use to copy the content within a single command? I have heard about cat, yet that did not work in my case.
Use pbcopy:
cat myfile.txt | pbcopy
More examples.
On a mac, you can click on the terminal and Cmd-A, or go to Edit->select all, to select everything. Then Cmd-C to copy and Cmd-V to paste.
EDIT: To copy a file, open the file in TextEdit and do as above.
Not sure if its the best option, but you can use:
nano fileName.txt
and then use your mouse (left) to copy partial or entire contents. And then right click and "Copy."
This will work if cat is not working for you.
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 2 years ago.
Improve this question
right now my terminal reads Sean:~ A2014$ and I don't understand how to change it so it doesn't say Sean. Is there a general terminal name or are they relative based off of your system?
I'm presuming you're referring to the prompt? (Next to where you input commands in the terminal). If you want to change the title of the window, i think you can go to Shell>Edit title in the top bar while terminal is open.
On MacOS you should be able to edit/create a file in ~ (The home directory) called .bash_profile. In this file you can change (or add if it's not there) export PS1="{settings}" where {settings} is what will show up as the terminal prompt.
You can do this with a text editor like nano;
In a terminal you would type cd ~ and then
nano .bash_profile to create/edit it. Just make sure not to edit any PATH variables!
There are a bunch of bash prompt flags to display things like time and computer name you can look up, but you can just use plaintext as the prompt if you like. (A single $ is pretty common)
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
Is there a way to copy-paste a filename with full path to the command line in Windows directly by right or left clicking the filename IN FOLDER (BROWSING) VIEW? Pasting a path is simple (by copying from top of the folder), but entering a full path/file.ext as an argument value requires typing or a separate select-filename's-text, F2, select all, and copy-paste?
For example copy this entire string directly to command line in one move from folder view (or whatever is called when the windows are open listing the many files)?:
C:\Users\aaa\Desktop\file.txt
I tried various combinations of right an left clicks, copy, paste, alt, shift, ctrl, does not work.
Method 1:
Works by drag and drop the file into the command prompt. It does not work in powershell (5 1).
Method 2:
Shift+right click in explorer on any file or directory and select copy as path in the context menu. Works in CL and PS.
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 had filled in an application form in which I made a payment and copied the application number by "Ctrl+C" command (and unfortunately I didn't note it anywhere).
And after that I copied some other thing but I didn't notice my application number has washed off from the temporary memory. I even tried to login but was unsuccessful.
I now need help: is there any method to print all copied things (I have not copied any file only some text like email id's and else). I have not turned off my PC since that. Please tell is there any method to print on note pad or any other?
Windows Systems do not save the clipboard history. There is only one item stored in the clipboard. If you copy something new the previous clipboard contents is overwritten and lost forever. To get the full Microsoft clipboard history you need to use third-party utilities such as clipdiary or Clipboard History extension.
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
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 puts all my dotfiles in $HOME/Dropbox/dotfiles
and make a hard link(I think it's the way to go, and for instance vim does't load soft link rc file)
ln $HOME/Dropbox/dotfiles/.vimrc $HOME/.vimrc
The problem is as long as I make change to the file in the dropbox directories, everything works as expected. But when I change the hard link file(which is $HOME/.vimrc), the original file changes accordingly, but dropbox won't sync!!(same as iCloud mobile document folder)
Any idea?
Use soft links. Hard links make it so that Dropbox can't tell when the file is updated. This is because Dropbox doesn't poll the contents of every single file you have, it just looks at modification dates on the files located in your Dropbox.
This is exactly what I use for syncing my dot files with Dropbox:
$ ln -s ~/Dropbox/dotfiles/.vimrc .vimrc
and vim still loads the soft-linked vimrc file.