Questions tagged [unix]
Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs.
3,992
questions
117
votes
3
answers
384k
views
What is the .bashrc file?
Unix shells when starting read the .bashrc file and execute commands written in it. What is this file and what does it execute?
116
votes
5
answers
172k
views
Check if any of the parameters to a bash script match a string
I'm trying to write a script where I want to check if any of the parameters passed to a bash script match a string. The way I have it setup right now is
if [ "$3" != "-disCopperBld" -a "$4" != "-...
114
votes
4
answers
28k
views
'less' command clearing screen upon exit - how to switch it off?
How to force the less program to not clear the screen upon exit?
I'd like it to behave like git log command:
it leaves the recently seen page on screen upon exiting
it does not exit the less even ...
113
votes
9
answers
127k
views
On Linux/Unix, does .tar.gz versus .zip matter?
Cross-platform programs are sometimes distributed as .tar.gz for the Unix version and .zip for the Windows version. This makes sense when the contents of each must be different.
If, however, the ...
113
votes
6
answers
43k
views
What is the origin of the UNIX $ (dollar) prompt?
The UNIX prompt uses a $ symbol to indicate that your input is expected.
I was wondering why this symbol was chosen—if there is a reason. Dollar just seems a little unexpected. A > symbol would ...
111
votes
16
answers
110k
views
How can I trigger a notification when a job/process ends?
The place I work at has commands that take a long time to execute.
Is there a command/utility that I can use to notify me when the command execution is over? It could be a popup window or maybe a ...
111
votes
5
answers
111k
views
Unix: How to unsplit in screen
I'm trying to learn how to use screen, in unix so that I don't have to open up several ssh connections and terminal windows just because I want to do more than one thing at the same time on a machine. ...
111
votes
3
answers
183k
views
How can I copy a file in Unix without altering its last modified time?
If I copy some file from some place to another using cp, the timestamp on the copied file is set to the time of the copy.
Is there some way to avoid this?
I need to copy files without altering their ...
106
votes
8
answers
126k
views
How can I find the oldest file in a directory tree
I'm looking for a shell one-liner to find the oldest file in a directory tree.
103
votes
13
answers
161k
views
What commands can I use to reset and clear my terminal?
I have been using the command:
reset
to clear my terminal. Although I am pretty sure this is not what I should be doing. Reset, as the name suggests, resets your entire terminal (changes lots of ...
100
votes
2
answers
178k
views
How do I clear out the ssh-agent entries (on Mac OS X )?
I'm running Mac OS X, and it appears that after SSHing to several machines, using identity files, my 'ssh-agent' builds up a lot of identity / keys and then sometimes offers too many to a ...
97
votes
3
answers
67k
views
Does rm -rf follow symbolic links?
I have a directory like this:
$ ls -l
total 899166
drwxr-xr-x 12 me scicomp 324 Jan 24 13:47 data
-rw-r--r-- 1 me scicomp 84188 Jan 24 13:47 lod-thin-1.000000-0.010000-0.030000.rda
drwxr-...
95
votes
6
answers
362k
views
How to gzip multiple files into one gz file?
I have 100 files: cvd1.txt, cvd2.txt ... cvd100.txt
How to gzip 100 files into one .gz file, so that after I gunzip it, I should have cvd1.txt, cvd2.txt ... cvd100.txt separately?
93
votes
6
answers
93k
views
Can I monitor a local unix domain socket like tcpdump?
I'd like to monitor responses on a unix socket without disturbing the original connections and pipe them to a script for processing.
I know how to do this with tcpdump for tcp connections but I ...
92
votes
6
answers
185k
views
Delete files with regular expression
I Tried to delete files that starts with A and ends with 2 numbers but It doesn't do a thing.
What I tried:
rm ^A*[0..9]2$
Where am I wrong?