Linux refers to the family of Unix-like computer operating systems using the Linux kernel. If your question is about a certain distribution only, use a more specific tag.

learn more… | top users | synonyms

79
votes
17answers
85k views

Linux utility for finding the largest files/directories [closed]

I'm looking for a program to show me which files/directories occupy the most space, something like: 74% music \- 60% music1 \- 14% music2 12% code 13% other I know that it's possible in KDE3, but ...
79
votes
11answers
111k views

How to move all files from current directory to upper directory?

How to move all files from current directory to upper directory in linux? I tried something like mv *.*, but it doesn't work.
78
votes
7answers
28k views

What is the difference between executing a bash script and sourcing a bash script?

What is the difference between executing a bash script like A and sourcing a bash script like B? A >./myscript B >source myscript
77
votes
7answers
121k views

How to copy symbolic links?

I have directory that contains some symbolic links: user@host:include$ find .. -type l -ls 4737414 0 lrwxrwxrwx 1 user group 13 Dec 9 13:47 ../k0607-lsi6/camac -> ../../include 4737415 ...
77
votes
2answers
59k views

Finding the process that is using a certain port in Linux

I'd like to be able to find out which process is currently using a certain port in Linux. Is there any way to do this?
76
votes
8answers
40k views

Reload a Linux user's group assignments without logging out

When assigning a user's secondary group list using: # usermod -G <grouplist> <user> is it possible to force this group assignment to take effect without logging out all running ...
73
votes
2answers
7k views

Is “ps -u” Really a Bad Syntax?

IMHO ps -u shows a very useful output, much better than ps -u $USER: $ ps -u Warning: bad syntax, perhaps a bogus '-'? See /usr/share/doc/procps-3.2.8/FAQ USER PID %CPU %MEM VSZ RSS TTY ...
73
votes
3answers
96k views

How to install local .deb packages with apt-get

Is there a way to install packages store on your HD with apt-get, like a "apt-get install ./package.deb ? If not how to handle the dependencies in a very very easy way.
72
votes
9answers
201k views

What is the Linux command to find out hardware info?

I need to find out hardware information for the below items under Linux: CPU (and cores) CPU speed Memory Hard disks OS version Any advice?
71
votes
7answers
66k views

What to do when Ctrl + C can't kill a process?

Ctrl + C doesn't always work to kill the current process (for instance, if that process is busy in certain network operations). In that case, you just see "^C" by your cursor and can't do much else. ...
70
votes
3answers
173k views

What is the difference between i686 and x86_64?

I have an AMD Turion and do not know what to choose between these two versions to install Arch Linux. Thank you.
69
votes
6answers
4k views

How do I perform commands in another folder, without repeating the folder path?

Is there a clever way to do copy and move operations or a command to duplicate a file, without having to do a cd, then mv after, at the same folder? For example, I have to run the following: mv ...
68
votes
13answers
12k views

How is Linux not prone to viruses, malware and those kinds of things?

How is Linux protected against viruses? This question was a Super User Question of the Week. Read the blog entry for more details or contribute to the blog yourself
66
votes
4answers
8k views

Why would you `cat /dev/null > /var/log/messages`?

On this bash scripting example page the author presents this script: # Cleanup # Run as root, of course. cd /var/log cat /dev/null > messages cat /dev/null > wtmp echo "Log files cleaned up." ...
65
votes
5answers
7k views

What are the functions of the BIOS while the operating system is running?

I always wondered whether the BIOS (apart from conducting POST, starting the bootloader and passing control to the OS after one presses the power button) has any purpose or function while the ...
64
votes
3answers
102k views

How can I determine what process has a file open in Linux?

I'd like to determine what process has ownership of a lock-file. The lock-files are simply a file with a specific name that has been created. So, how can I determine what process has a particular ...
62
votes
3answers
63k views

How to find the executable files under a certain directory in linux?

How to find the executable files under a certain directory in linux?
61
votes
10answers
63k views

Remove a certain line from Bash history file

How can I remove a certain line from history's database?
60
votes
13answers
7k views

Is Unix not a PC operating system? [closed]

I am doing my bachelor's degree at a university. In a written assignment, the professor posted the task: "Name three PC operating systems". Well, I went on an included a variety of OSes (Linux, ...
60
votes
4answers
107k views

How to remove a symbolic link to a directory?

I made a symbolic link with the following commmand: ln -s ../test5 I want to remove it now but my rm fails: $ rm -Rf test5/ rm: cannot remove `test5/': Not a directory $ rm test5/ rm: cannot ...
59
votes
7answers
156k views

Test if a port on a remote system is reachable (without telnet)

In the old days, we used telnet to see if a port on a remote host was open: telnet hostname port would attempt to connect to any port on any host and give you access to the raw TCP stream. These ...
59
votes
2answers
48k views

What is the difference between yum, apt-get, rpm, ./configure && make install?

I am new to Linux and am running CentOS. I have come across four ways to update or install software. So far, I've seen: yum install [program] apt-get install [program] rpm -i [program].rpm wget ...
57
votes
5answers
111k views

If I know the PID number of a process, how can I get its name?

If I have the PID number for a process (on a UNIX machine), how can I find out the name of its associated process? What do I have to do?
56
votes
15answers
47k views

Untar, ungz, gz, tar - how do you remember all the useful options?

I am pretty sure I am not the only one with the following problem: every time I need to uncompress a file in *nix I can't remember all the switches, and end up googling it, which is surprizing ...
56
votes
12answers
74k views

Unix/Linux find and sort by date modified

How can I do a simple find which would order the results by most recently modified? Here is the current find I am using (I am doing a shell escape in PHP, so that is the reasoning for the variables): ...
56
votes
11answers
71k views

Automatically mount external drives to /media/LABEL on boot without a user logged in?

This question is similar, but kind of the opposite of what I want. I want external USB drives to be mounted automatically at boot, without anyone logged in, to locations like /media/<label>. I ...
55
votes
6answers
90k views

How to check which timezone in Linux?

Is there a way to check which time zone I'm currently in on Linux?
55
votes
3answers
17k views

What's like OSX's pbcopy for Linux

In a terminal in OSX I can pipe output to pbcopy and then go into a web browser and paste it. I tried this in Linux with xcopy but when I switch to the browser it just overwrites the clipboard with ...
54
votes
8answers
30k views

How can I open a file read-only from command line with emacs/vi/vim

Is there a way to tell emacs/vi/vim (from the command line) that I want to view the file in view-mode or read-only. I know how to open a file as read only if emacs/vi/vim is already running.
54
votes
16answers
72k views

How to synchronize the home folder between multiple computers?

I have three computers at home, and would like to have the /home/ folder tree synchronized between the three. Any files/folders (except those hidden) that are modified/added/removed in one of the ...
54
votes
8answers
11k views

Cross-platform file system

I would like my external drives to be readable and writable from Linux, Mac OS X and Windows. FAT32 works, but the 4 GB file size limit is a showstopper these days. Are there any alternatives?
54
votes
8answers
77k views

How can I tunnel all of my network traffic through SSH?

Whenever I'm using the internet from an insecure location (such as public wifi) I like to use an ssh tunnel (ssh -D port host) to ensure my traffic can't be sniffed. Unfortunately, there seem to be ...
53
votes
4answers
4k views

Is a file system just the layout of folders?

I have used Windows since childhood, and when I hear the phrase "Windows filesystem" I think of directories (folders) within directories, a folder called SYSTEM, a folder called PROGRAM FILES etc. Is ...
53
votes
4answers
64k views

How to specify level of compression when using tar -zcvf?

I gzip directories very often at work. What I normally do is tar -zcvf file.tar.gz /path/to/directory Is there a way to specify the compression level here? I want to use the best compression ...
53
votes
12answers
61k views

How to start GUI linux programs from the command line, but separate from the command line?

I've searched for this before, but have never been able to find an answer. In Windows, if I have a console window open, type winmine, and press enter, Minesweeper will appear, completely separate ...
53
votes
4answers
4k views

How does /proc/* work?

There are many files in /proc, like /proc/cpuinfo, /proc/meminfo, /proc/devices and so on, which, when opened, return system information. These files do not seem to have any existence in reality, as ...
53
votes
5answers
3k views

How to “unextract” a zip file?

I extracted a zip file into a non-empty folder. The zip file has lots of files and a deep hierarchy, that merged with the existing tree of the target directory. How can I remove the files and ...
53
votes
3answers
89k views

How to make new file permission inherit from the parent directory?

I have a directory called data. Then I am running a script under the user id 'robot'. robot writes to the data directory and update files inside. The idea is data is open for both me and robot to ...
52
votes
9answers
69k views

How do I add a user to multiple groups in Ubuntu?

What's the command line utility and the arguments it requires?
49
votes
5answers
170k views

Checking what PHP version I'm running on Linux?

I'm running Centos 5 and I need to know what version of PHP I'm running, is there a command for this which I can run?
49
votes
4answers
17k views

less is more? Is more less? I'm so confused

When I first heard their names, I got really confused when I tried to guess what these tools might do, I thought I'd misheard something. What's the difference between more and less, i.e. why ...
49
votes
5answers
62k views

Read the contents of a zipped file without extraction? [duplicate]

How can I see the contents of a particular file in an archive without extracting the .zip it is contained within? I'm using the Linux command line.
49
votes
4answers
36k views

What does load average mean in unix/linux?

If I run uptime, I get something like this: 10:50:30 up 366 days, 23:27, 1 user, load average: 1.27, 2.06, 1.54 What do those numbers on the end mean? The man page tells me it's "the load ...
48
votes
8answers
2k views

How do you configure a Windows machine for a Linux user? [closed]

How do you configure a Windows (preferably latest version) machine for a Linux power user, so that s/he can get most out of it?
48
votes
3answers
109k views

Get a list of Open Ports in Linux

I need a Linux command to list all free open ports for use in an application lsof -i TCP| fgrep LISTEN Does not seen to be helping as the Ports it lists are not necessarily free for use. How do I ...
48
votes
7answers
41k views

How to throttle bandwidth on a Linux network interface?

Is there a way to constrain the bandwidth on a NIC in linux? I'd like to be able to simulate an arbitrarily slow connection.
47
votes
2answers
74k views

Bash: Display each sub-directory size in a list format using 1 line command?

I want to get a list of the directories and their sizes in a list format like how you get when you do a ls -l. The thing is that is there a one line command that can do this? I see others have long ...
47
votes
3answers
94k views

Linux: find out what process is using all the RAM?

Before actually asking, just to be clear: yes, I know about disk cache, and no, it is not my case :) Sorry, for this preamble :) I'm using CentOS 5. Every application in the system is swapping ...
46
votes
11answers
13k views

What is the relationship between Unix, Linux, Ubuntu, Debian and Android?

What is the relationship between Unix, Linux, Ubuntu, and Debian? I suspect they are all Operating Systems that are based upon one another - similar to how Windows is based on DOS. Is my suspicion ...
46
votes
5answers
47k views

How can I avoid SSH's host verification for known hosts?

I get the following prompt everytime I try to connect a server using SSH. I type "yes", but is there a way to aovid this? The authenticity of host '111.222.333.444 (111.222.333.444)' can't be ...