In this particular case the reset command. I want to read the code of this command.  TY
124277
I'm answering a question with a suggestion to use rename, and I realize I don't know what package it comes from (as part of the answer, I imagine saying something like "if you don't have rename, it's installed as part of [package]").  man rename tells me to SEE ALSO: mv(1), perl(1) - so my first thought is that it was installed with perl.  A related answer, , helps me figure out that the perl package includes prename but not rename - and it turns out that my /usr/bin/rename points to /etc/alternatives/rename which points to /usr/bin/prename  So this is still kind of confusing.  Did /etc/alternatives/rename point somewhere else before I installed perl?  Is there a general way to tell which package something comes from?
51223
I really enjoying using control+r to recursively search my command history. I've found a few good options I like to use with it: # ignore duplicate commands, ignore commands starting with a space export HISTCONTROL=erasedups:ignorespace  # keep the last 5000 entries export HISTSIZE=5000  # append to the history instead of overwriting (good for multiple connections) shopt -s histappend  The only problem for me is that erasedups only erases sequential duplicates - so that with this string of commands: ls cd ~ ls  The ls command will actually be recorded twice. I've thought about periodically running w/ cron: cat .bash_history | sort | uniq &gt; temp.txt mv temp.txt .bash_history  This would achieve removing the duplicates, but unfortunately the order would not be preserved. If I don't sort the file first I don't believe uniq can work properly. How can I remove duplicates in my .bash_history, preserving order? Extra Credit: Are there any problems with overwriting the .bash_history file via a script? For example, if you remove an apache log file I think you need to send a nohup / reset signal with kill to have it flush it's connection to the file. If that is the case with the .bash_history file, perhaps I could somehow use ps to check and make sure there are no connected sessions before the filtering script is run?
69909
What's the equivalent of # for Windows cmd console sessions, to create a comment?   The operating system is Windows XP.
91031
For instance, netstat. This doesn't show up when you type help, but netstat /? does provide the information.  Are there any other commands that will not get listed?  Also, the command netstat /? &gt; netstat.txt won't work. Any idea why? The netstat.txt file is created but remains empty.  I have write-permission on the map and the CMD.EXE is running as admin.
1075
My current prompt is colorized and edited as so -  #!/bin/bash  # GIT Prompt help if tput setaf 1 &amp;&gt; /dev/null; then     tput sgr0; # reset colors     bold=$(tput bold);     reset=$(tput sgr0);     txtund=$(tput sgr 0 1);     black=$(tput setaf 0);     blue=$(tput setaf 33);     cyan=$(tput setaf 37);     green=$(tput setaf 64);     orange=$(tput setaf 166);     purple=$(tput setaf 125);     red=$(tput setaf 124);     violet=$(tput setaf 61);     white=$(tput setaf 15);     yellow=$(tput setaf 136); else     bold='';     reset="\e[0m";     black="\e[1;30m";     blue="\e[1;34m";     cyan="\e[1;36m";     green="\e[1;32m";     orange="\e[1;33m";     purple="\e[1;35m";     red="\e[1;31m";     violet="\e[1;35m";     white="\e[1;37m";     yellow="\e[1;33m"; fi; ORIG=$PS1 HOST=$HOSTNAME PS1="\[${txtund}${green}\]${HOST}\[\[${reset}\]"; PS1+="\$(prompt_git \"\[${white}\] on \[${violet}\]\")"; PS1+="\[${reset}\]"; PS1+="\[ at - ${orange}\W\]"; PS1+="\[${reset}\]"; PS1+="\[ - \u \]"; PS1+="\n\$ ";   I know that the line  PS1+="[ - \u ]"; will show me my current user. However, I want that section to be red if it is root. All other users should be the default color of gray. Is there a way to change the color in that section based off of current user or should I just declare a variable and use an IF statement to insert that section or a modified section with red as a color?  My expected output is gray named user for all normal users. Root should be red. This is BASH.
20947
In , I can do something like this:  ALTER SEQUENCE serial RESTART WITH 0;   Is there an Oracle equivalent?
25720
i need to learn to do it just using the commands in the terminal. any help would really help thanks
19072
In bash, from inside PROMPT_COMMAND, is there a way to tell if the user just hit 'return' and didn't enter a command?
26600
On the bash command-line, ↑ gives me the previous command. On the command-lines in ipython or matlab, when I type a few characters, ↑ gives me the previously entered command starting with those characters. How can I enable exactly this behaviour in bash? I am aware of more advanced ways of searching through the command-line history, but sometimes a simple way is more convenient.
114210
Is there a command to clear all of the history in a Cygwin console window without losing the .bash_history?
34710
I need to set the same chmod, how to get number for -rw-r--r-- ?
6653
Suppose I want to execute a sequence of four commands that I have executed before. If the first one is 432 in the command-history, then I could do:  $ !432; !433; !434; !435   I'm curious, is there a more efficient way to accomplish this?
86394
I recently asked a question on Ask Ubuntu (or somewhere else), and a comment or answer asks me to paste the contents of some file or the output of a command to troubleshoot my problem.  How do I do that?
105634
Often I need to recall the different \tracing commands; and a couple of times I stumbled on some webpages that worked fine for me; sadly, I didn't keep them, and my searches don't take me there anymore.   So I thought I'd ask about links to where one can read a list of \tracing commands?   For instance,  mentions:  \tracingall \tracingassigns \tracingcommands \tracinggroups \tracingifs \tracinglostchars \tracingmacros \tracingnesting \tracingonline \tracingoutput \tracingpages \tracingparagraphs \tracingrestores \tracingstats \tracingscantokens   .. but, I'm pretty sure there was something like \tracingboxes (and not so sure if there was something like \tracingglues); yet I cannot find any resources mentioning those.
96729
I just jumped into a command line virtual console using Ctrl-Alt-F1, and i would now like to return to the gui. startx gives me something along the lines of 'this server is already active for display 0' if ...etc. it gives me a command to remove /tmp/.X0lock if that isn't the case...I could just restart the machine, but i'm worried i might mess something up.
1580
Given a hotkey, how can I find which program owns it?
62902
Browsing the last command's results in Bash is a bit hard because the command prompt and results are the same color. This makes it hard to separate the results of consecutive commands.  How do I change the color to pink for example?