Most Popular
1500 questions
141
votes
8 answers
How can I monitor all outgoing requests/connections from my machine?
My machine is a server so I want to ignore connections being made to my server (e.g. when someone visits my website). I want to see only connections/requests being made by my server to other places.
How do I see only those outgoing…

trusktr
- 4,165
141
votes
7 answers
What is /usr/local/bin?
Before today, I've used the terminal to a limited extent of moving in and out of directories and changing the dates of files using the touch command. I had realised the full extent of the terminal after installing a fun script on Mac and having to…

JFW
- 2,187
141
votes
6 answers
How to pass parameters to an alias?
For bash script, I can use "$@" to access arguments. What's the equivalent when I use an alias?

prosseek
- 8,558
141
votes
9 answers
The myths about malware in Unix / Linux
Is it possible for my Linux box to become infected with a malware?
I haven't heard of it happening to anyone I know, and I've heard quite a few times that it isn't possible. Is that true?
If so, what's up with Linux Anti-Virus (security) software?

Stefan
- 25,300
141
votes
12 answers
How can I fix "cannot find a valid baseurl for repo" errors on CentOS?
I finished installing CentOS 6, but when I tried running yum update I got:
[root@centos6test ~]# yum update
Loaded plugins: fastestmirror, refresh-packagekit
Determining fastest mirrors
Could not retrieve mirrorlist…

shivshankar
- 1,538
140
votes
5 answers
last time file opened
Is it possible to get the time when file was opened last time and sort all files in a directory by those times?

student
- 18,305
140
votes
10 answers
File permission issues with shared folders under Virtual Box (Ubuntu Guest, Windows Host)
I am using Ubuntu on Virtual Box and I have a folder which is shared between the host (Windows) and the VM (Ubuntu). When I open any file in the share folder in Ubuntu, I can not change it as its owner is set to root.
How can I change the ownership…

user654019
- 2,307
- 4
- 21
- 21
140
votes
4 answers
What is the difference between ~/.profile and ~/.bash_profile?
What is the difference between ~/.profile and ~/.bash_profile?

lakshmen
- 6,241
140
votes
18 answers
Quickly calculate date differences
I often want to make some quick date calculations, such as:
What is the difference between these two dates?
What is the date n weeks after this other date?
I usually open a calendar and count the days, but I think there should be a program/script…

daniel kullmann
- 9,527
- 11
- 39
- 46
140
votes
4 answers
Copy the contents of a file into the clipboard without displaying its contents
How to copy the contents of a file in UNIX without displaying the file contents. I don't want to cat or vi to see the contents.
I want to copy them to clipboard so that I can paste it back on my windows notepad.
I can't copy the file from that…

Web Nash
- 2,283
140
votes
11 answers
How to follow links in linux man pages?
Is there a way to follow the links mentioned in a man page? For example, here's the man page for ps; how do I access the underlined link circled in red in the screenshot: top(1)?

its_me
- 13,959
140
votes
12 answers
List packages on an apt based system by installation date
How can I list installed packages by installation date?
I need to do this on debian/ubuntu. Answers for other distributions would be nice as well.
I installed a lot of stuff to compile a certain piece of code, and I want to get a list of the…

Elazar Leibovich
- 3,231
- 5
- 27
- 28
139
votes
10 answers
How to unzip a multipart (spanned) ZIP on Linux?
I need to upload a 400mb file to my web server, but I'm limited to 200mb uploads. My host suggested I use a spanned archive, which I've never done on Linux.
I created a test in its own folder, zipping up a PDF into test.zip.001, .002, and .003. How…

Tim
- 1,493
139
votes
16 answers
How to connect to a serial port as simple as using SSH?
Is there a way to connect to a serial terminal just as you would do with SSH? There must be a simpler way than tools such as Minicom, like this
$ serial /dev/ttyS0
I know I can cat the output from /dev/ttyS0 but only one way communication is…

norq
- 4,081
139
votes
7 answers
Redirecting stdout to a file you don't have write permission on
When you attempt to modify a file without having write permissions on it, you get an error:
> touch /tmp/foo && sudo chown root /tmp/foo
> echo test > /tmp/foo
zsh: permission denied: /tmp/foo
Sudoing doesn't help, because it runs the command as…

Michael Mrozek
- 93,103
- 40
- 240
- 233