export LD_LIBRARY_PATH=.
Source: StackOverflow
You're a little ambiguous. I expect you're probably a Linux user inside X who wants to put stuff in the X PRIMARY clipboard.
It's important to understand that bash doesn't have a clipboard. There is no such thing as “the” clipboard, because bash can run on Windows, Mac OS X, lots of other OSes, inside X, outside X, … Not to mention that X itself has three different clipboards itself. There's a wealth of clipboards you could be dealing with. Usually the clipboard you want to talk to has a utility that lets you talk to it.
In case of X, yes, there's xclip (and others).
If you're trying to talk to the Mac OS X clipboard, there's pbcopy.
If you're in Linux terminal mode (no X) then maybe you need to look into gpm.
There's also GNU screen which has a clipboard. To put stuff in there, look at the screen command “readreg”.
For Windows, read /dev/clipboard (thanks glenn).
Note that xclip -selection c will send data to the clipboard that works with ^C, ^V in most applications.
cat filename.java | xclip -selection c
%p filename, including name(s) of directory the file is in %m permissions of file, displayed in octal. %f displays the filename, no directory names are included %g name of the group the file belongs to. %h display name of directory file is in, filename isn't included. %u username of the owner of the file
find . -name \*.dat -maxdepth 1
tmux tmux new tmux new-session new Start a new session
tmux new -s mysession new -s mysession Start a new session with the name mysession
tmux kill-ses -t mysession tmux kill-session -t mysession kill/delete session mysession
tmux kill-session -a kill/delete all sessions but the current
tmux kill-session -a -t mysession kill/delete all sessions but mysession
Ctrl + b $ Rename session
Ctrl + b d Detach from session
attach -d Detach others on the session (Maximize window by detach other clients)
| Command | Desc |
|---|---|
| setw -g mode-keys vi | use vi keys in buffer (“Ctrl + b :” to enter command mode. |
| Ctrl + b [ | Enter copy mode |
Ctrl + b PgUp Enter copy mode and scroll one page up
q Quit mode
g Go to top line
G Go to bottom line
Scroll up
Scroll down
h Move cursor left
j Move cursor down
k Move cursor up
l Move cursor right
w Move cursor forward one word at a time
b Move cursor backward one word at a time
/ Search forward
? Search backward
n Next keyword occurance
N Previous keyword occurance
Spacebar Start selection
Esc Clear selection
Enter Copy selection
Ctrl + b ] Paste contents of buffer_0
show-buffer display buffer_0 contents
capture-pane copy entire visible contents of pane to a buffer
list-buffers Show all buffers
choose-buffer Show all buffers and paste selected
save-buffer buf.txt Save buffer contents to buf.txt
delete-buffer -b 1 delete buffer_1
Ctrl + b : Enter command mode
set -g OPTION Set OPTION for all sessions
setw -g OPTION Set OPTION for all windows
set mouse on Enable mouse mode