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

52
votes
15answers
57k views

Linux utility for finding the largest files/directories

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 ...
52
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 ...
51
votes
9answers
142k 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?
51
votes
6answers
75k 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 ...
51
votes
4answers
2k 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 ...
51
votes
5answers
2k 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 ...
50
votes
6answers
60k views

Batch converting PNG to JPG in linux

Does anyone know a good way to batch-convert a bunch of PNGs into JPGs in linux? (I'm using Ubuntu). A png2jpg binary that I could just drop into a shell script would be ideal.
47
votes
7answers
37k 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. ...
47
votes
5answers
22k views

Automatically answer 'Yes' when using apt-get install

Is there a way to make apt-get install answer "yes" to the "Do you want to continue [y/N]?"?
46
votes
5answers
34k views

Recursively count all the files in a directory [duplicate]

Possible Duplicate: How can I count the number of folders in a drive using Linux? I have a really deep directory tree on my Linux box. I would like to count all of the files in that path, ...
46
votes
15answers
39k 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 ...
46
votes
6answers
13k 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
44
votes
8answers
2k views

How do you configure a Windows machine for a Linux user?

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?
44
votes
4answers
75k 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 ...
42
votes
10answers
58k 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 ...
42
votes
1answer
5k views

If I buy a computer with Windows 8 and Secure Boot, will I still be able to install Linux?

I've heard a lot about how Microsoft is implementing UEFI Secure Boot in Windows 8. Apparently it prevents "unauthorized" bootloaders from running on the computer, to prevent malware. There's a ...
41
votes
11answers
47k 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 ...
41
votes
4answers
80k views

How to decompress a .bz2 file

I have a file as: filename.bz2, but I can't figure out how to decompress it. I tried several methods, none of them seems work. I have tried the command: tar xvjf filename.tar.bz2, but it didn't work ...
41
votes
2answers
26k 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 ...
40
votes
9answers
41k views

How to clear the contents of a file from the command line?

I have a log file that has a bunch of stuff in it that I don't need anymore. I want to clear the contents. I know how to print the contents to the screen: cat file.log I know how to edit the file, ...
40
votes
3answers
65k 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 ...
40
votes
3answers
65k 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 ...
40
votes
6answers
18k views

Better Ubuntu Fonts

I have been using Ubuntu for a while. I like it. I like it a lot. But once in a while, when I switch to Windows, I feel better because I really like the font. It feels really much pleasant to watch ...
39
votes
9answers
3k views

Why is Bash everywhere (in most if not all Linux distributions)?

Bash is used by default in every Linux distribution I have tried, over alternatives like Z shell (zsh). Is there a technical or historical reason for this?
39
votes
4answers
39k 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 ...
39
votes
6answers
44k views

How to list folders using bash commands?

Is there any way to list just the folders in a directory using bash commands? ( as the ls command lists all the files and folders )
38
votes
3answers
110k 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.
38
votes
2answers
4k views

what is the difference between “command && command” and “command ; command”

I see these two usage on Ubuntu "command && command" and "command ; command", e.g. apt-get update && apt-get upgrade What would differ if I use apt-get update; apt-get upgrade? I ...
38
votes
8answers
7k 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?
38
votes
7answers
33k 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.
38
votes
3answers
12k 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 ...
38
votes
3answers
24k 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 ...
37
votes
16answers
47k 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 ...
37
votes
6answers
79k views

How do I restart Linux (Ubuntu) from the command-line?

Because of my problem with mouse-clicks being ignored in Ubuntu, I want to restart from the command-line. (I have an open Terminal, and the keyboard is not ignored.) How do I restart a computer ...
37
votes
12answers
82k views

How to recover a removed file under Linux?

By accident, I used rm on a file I didn't want to delete. Is there a way that I can get it back under Linux?
36
votes
6answers
21k 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 ...
36
votes
4answers
81k views

What is this dm-0 device?

While poking around trying to figure out why a Linux -> Linux file transfer is running slower than I think it should, I stumbled across something I'm not familiar with. /dev/dm-0 seems to be my ...
36
votes
9answers
48k views

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

What's the command line utility and the arguments it requires?
36
votes
12answers
46k 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): ...
36
votes
3answers
50k 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.
36
votes
8answers
53k 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 ...
35
votes
7answers
3k views

How can a Linux OS be “based on” another Linux OS?

I've been looking through quite a number of Linux distros recently to get an idea of what's around, and one phrase that keeps coming up is that "[this OS] is based on [another OS]". For example: ...
35
votes
7answers
5k views

Linux equivalent of Windows Registry

What is the Linux equivalent of Windows Registry? If there is no equivalent or similar structure in Linux, how are the things that are done by the Windows Registry handled in Linux?
35
votes
4answers
48k views

No option to hibernate/shutdown in GNOME 3?

I have installed Fedora 15 Alpha with GNOME 3. Everything is working fine. However, I can't see any option to hibernate or shutdown. In the top panel when I click my user name, I only have one option ...
34
votes
4answers
59k views

Permissions on private key in .ssh folder?

I changed my permissions in my .ssh folder and now when I use a piece of software that uses my private key, I have to type my password each time. What should my permissions be on my id_rsa file to ...
34
votes
3answers
41k 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?
34
votes
1answer
8k 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 ...
34
votes
3answers
2k views

Palindrome passwords disallowed—why?

I tried to change a Linux password to "sitonapotatopanotis" and got this error: BAD PASSWORD: is a palindrome Why does this rule exist?
33
votes
12answers
3k views

How do I remove a file in Linux whose name looks like it's ONLY a hyphen, as in “-”

I've tried rm -- - rm "-" rm "\-" rm \- Gave Perl a shot ~$ perl -e '$junk = glob("-"); chomp $junk; print "$junk\n"; `rm $junk`;' - rm: cannot remove `-': No such file or directory ...and... ...
33
votes
8answers
19k 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.