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

27
votes
4answers
38k views

When should I use /dev/shm/ and when should I use /tmp?

When should I use /dev/shm/ and when should I use /tmp? Can I always rely on them both being there on Unices?
27
votes
4answers
7k views

Two keyboards on one computer. When I write with A i want a US keyboard layout, when I use B i want Swedish. Possible?

I have a laptop which I use an external keyboard with. When I type using the external keyboard I want to use a US keyboard layout, since that's the type of external keyboard I have. On the other hand, ...
26
votes
8answers
3k views

Swap partition size on a 64 GB RAM computer for memory-intensive work

I have 64 GB RAM and 240 GB SSD on my computer, which I'm going to use for memory-intensive calculations (machine learning, data mining, etc.). Most of the advice I found on the Internet are ...
26
votes
3answers
2k views

Why does a failed linux login take so long? [duplicate]

Possible Duplicate: Why would an incorrect password attempt take a lot longer to process than a correct one? When you get the correct login credentials, you are logged in immediately. When ...
26
votes
3answers
20k views

Case Insensitive search from find command?

I am not able to figure out how can I do case-insensitive search using the find command. I tried find . -name -i pattern And it does not work.
26
votes
2answers
57k views

How do you set a password for transmission-daemon, the BitTorrent client server?

The config file is ambiguous, and keeps getting overwritten when you restart the daemon in Debian, anyway. In /etc/transmission-daemon/settings.json, there are these options: rpc-username ...
26
votes
4answers
85k views

How to upload one file by FTP from command line?

I need to upload a single file to FTP server from Ubuntu. This operation should be done in a script (in non-interactive mode). What is the right syntax for ftp? I'm trying this, to no avail: $ ftp ...
26
votes
9answers
16k views

Linux: Compare Directory Structure Without Comparing Files

What is the best and simplest way to compare two directory structures without actually comparing the data in files. This works fine: diff -qr dir1 dir2 But it's really slow because it's comparing ...
26
votes
4answers
17k views

How do I find out what processes are accessing the hard disk in a GNU/Linux-based system?

I'm looking for the equivalent to top for disk access, so I can tell which process(es) are currently reading and/or writing to disk. I'm currently using Ubuntu, but I imagine there's a standard tool ...
26
votes
3answers
6k views

Can a process be frozen temporarily in linux?

I was wondering if there is a way to freeze any process for a certain amount of time? What I mean is that: is it possible for one application (probably running as root) to pause the execution of ...
26
votes
5answers
2k views

Does running commands verbosely make them slower?

I've found myself using the -v flag for lots of applications less and less (especially for trivial stuff like tar and cp). However, when I did and I was, say, unzipping a large file, it would take ...
26
votes
3answers
52k 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 ...
26
votes
5answers
6k views

How do I physically find a wifi device using a laptop or mobile phone

Okay, so I have lost my tablet somewhere in my flat and have been searching for hours already. It is an Android device, which seems to have wifi enabled (responds to pings), but doesn't seem to react ...
25
votes
6answers
9k views

/usr/local or /opt?

How do you generally proceed for your package installations on Linux, for packages that are not part of your distrib's repos? On my side I am used to install in /opt. But since, I saw this doc on the ...
25
votes
10answers
13k views

How to Remove the Last 2 Lines of a Very Large File

I have a very large file ~400G, and I need to remove the last 2 lines from it. I tried to use sed, but it ran for hours before I gave up. Is there a quick way of doing this, or am I stuck with sed?
25
votes
3answers
15k views

How to add a command in vim editor?

If suppose my source code file name is "foo.c". While editing and debugging i always execute this command:- :!gcc -g foo.c -o foo;gdb foo Can I add a custom command to Vim such that If i type ...
25
votes
1answer
2k views

Why does deleting from the command line take significantly less time than from a GUI?

Something I wondered about as I was deleting a dozen or so images from my computer: With a quick rm -rf command on the directory's contents, all the images were gone in a snap. When I drag the same ...
25
votes
2answers
58k views

Linux - Mount device with specific user rights

How can I mount a device with specific user rights on start up? I still have some problems figuring it out. I would like to mount the divide with uid=1000 and gid=1000. My current entry to the ...
25
votes
5answers
10k views

Linux / OS X tar incompatibility – tarballs created on OS X give errors when untarred in Linux

When I tar up files on my Macbook and untar them in Linux, I repeatedly get the following warnings/errors: tar: Ignoring unknown extended header keyword `SCHILY.ino' tar: Ignoring unknown extended ...
25
votes
3answers
11k views

How do I execute multiple commands when using find?

I'm trying to run multiple commands on things I have found, how can I achieve this? find . -exec cmd1; cmd2 does not seem to work; it instead runs cmd2 after cmd1 has been executed on every file.
25
votes
8answers
6k views

How can I merge the gnome clipboard and the X selection?

I'm constantly frustrated by the two separate clipboards in X/Gnome. I'm constantly doing things like control-C to copy, and then middle-click to paste, and getting the wrong data. Or select ...
25
votes
3answers
6k views

How can I log all process launches in Linux

I would like to get a log of all processes that are launched with the time that they were launched and the arguments they were launched with. Is this possible in Linux?
25
votes
7answers
17k views

How to know which Linux Distribution I'm using?

How to know which Linux Distribution I'm using? uname -a gives Linux xxxxxx.net 2.6.9-42.0.3.EL.wh1smp #1 SMP Fri Aug 14 15:48:17 MDT 2009 i686 i686 i386 GNU/Linux How can I know this is ...
25
votes
1answer
28k views

Permission denied when accessing VirtualBox shared folder when member of the vboxsf group

I'm running Ubuntu 11.04 (guest) on Windows 7 (host) with the guest additions installed. I have an auto-mount folder that maps to my D: drive on the host which I can access using sudo ls ...
24
votes
4answers
7k views

How to lock a file against deletion but still make it writeable?

I want to make a file locked against deletion but still be writeable. How do I do this? The file in question is a Truecrypt volume as a file on a NAS SMB Network share, so I don't want to ...
24
votes
7answers
58k views

Copy directory contents using 'cp' command

How do you copy all the contents of one directory into another? For example: $ cd /home/newuser $ cp -a /backup/olduser/* . The problem with the above is that the globing pattern '*' matches the ...
24
votes
7answers
4k views

Why create many partitions?

I have noticed that when installing Ubuntu some people create multiple partitions for directories. Like one for root, one for home, one for boot. What is the advantage to doing this over installing ...
24
votes
9answers
54k views

How to convert Word (doc) to PDF in linux?

I have a set of files in .doc format, that need to be converted to .pdf format. I am using Ubuntu linux.
24
votes
3answers
2k views

What's all those users in the /etc/passwd file?

The /etc/passwd is supposed to have a line for every user on the system. Amongst the common username and root there is a bunch of other users. Some examples: timidity:x:114:127:TiMidity++ MIDI ...
24
votes
4answers
23k views

what does the dot mean at the end of -rw-r--r--. How do you set it with chmod?

I see that some of the files in my directories under Linux have a . at the end of the permissions listing. what does the dot mean at the end of -rw-r--r--. How do you set it with chmod ?
24
votes
6answers
51k views

Swap partition size for 4GB RAM

I'm planning to install Ubuntu 9.04 version. How much space should I dedicate for swap partition. I remember setting it to double the RAM size when I installed long back. At that time my RAM was 256 ...
24
votes
4answers
13k views

How do I get ls --color=auto to work on Mac OS X?

I'm trying to move my bash configuration from Ubuntu to Mac OS X and it looks like ls is slightly different. For instance, it won't accept the --color option. How do I get this to work?
24
votes
8answers
8k views

Booting Linux off USB pendrives

Booting a Linux system off USB Pendrives is one of my favorite things. On a laptop we have the following advantages, The Harddisk can be shutdown and that reduces power consumption (hdparm) The ...
24
votes
1answer
15k views

logrotate configuration file syntax - multiple wildcard entries possible?

Since the man page doesn't answer my question and I don't want to force a rotation cycle, I decided to ask the question here. The man page for logrotate gives the following example: ...
24
votes
5answers
4k views

VirtualBox from an existing partition

I installed VirtualBox on my Ubuntu Hardy Heron installation, and I would like to use it to virtualize Windows for those rare occasions that I actually need to do something there. Unfortunately, I ...
23
votes
8answers
27k views

How can you see the actual hard link by ls?

I run ln /a/A /b/B I would like to see at the folder a where the file A points to by ls.
23
votes
3answers
4k views

How accurate is `md5sum`?

When using md5sum to verify the integrity of a file, how accurate is the process? Does a verified MD5 mean that EVERY bit is exactly the same, or is there a threshold that must be broken before ...
23
votes
3answers
1k views

Have a file named ~ (tilde) in my home-directory (Linux)

I just noticed that I have a file called ~ in my ~-directory. $ ls -la ~ ... -rw-r----- 1 x1 x1 733962240 Mar 1 17:55 ~ ... Any idea how I can mv or rm it?
23
votes
3answers
2k views

What is the Linux command that encapsulates almost all of the other commands?

I remember that for Linux running in embedded systems, due to size limitations, it can't pack as many commands as in ordinary workstations. So there is a do-it-all command that can mimic almost all ...
23
votes
3answers
11k views

Convert a PDF to greyscale on the command line in FLOSS?

I have a colour PDF file, and I'm going to print it out and then photocopy it in black and white. I'd like to know what it's like in B&W before photocopying it. Is it possible to 'greyscale' a PDF ...
23
votes
7answers
29k views

How can I keep a process alive after closing the putty session?

I am using putty to interact with Linux server. I have started a process using putty. The process is running and will take 5-6 hours. I want that process to keep running after I close the putty ...
23
votes
3answers
1k views

Sudo su vs su linux

If I enter in the password to su when prompted, it doesnt work while sudo su does. Also, when a command is executed using sudo (command), does sudo automatically execute it by root by default (since ...
23
votes
5answers
30k views

Copy entire file system hierarchy from one drive to another

I would like to copy the entire file system hierarchy from one drive to another..i.e contents of each directory as well as regular files in Linux platform. Would be gratefull to know the best way to ...
23
votes
4answers
1k views

Why is it possible to change the password of an admin user on linux?

A few days ago, a friend of mine, wanted to show me that he can use my linux even if I don't tell him my password. He entered in GRUB, selected the recovery mode option. My first problem is that he ...
23
votes
2answers
643 views

What problems does udev actually solve?

For that matter, what exactly was wrong with a bunch of static files in /dev? It's apparently unsatisfactory enough for developers to have reinvented this wheel by my count 3 times now (devfs -> udev ...
23
votes
5answers
40k views

How to determine available free space on Ubuntu?

I am in a situation where I am getting an error when I try to save a file to my Ubuntu server via ssh. It says there isn't any available space left. I don't know how that can be true. What should I do ...
23
votes
7answers
132k views

How to set current time on Linux?

Why is the output of the following commands different? root@vmi2115:/var# hwclock Sun 26 Jun 2011 01:21:38 PM CEST -0.273230 seconds root@vmi2495:/var# date Sun Jun 26 15:21:39 CEST 2011 ...
23
votes
4answers
41k views

How to check which timezone in Linux?

is there anyway to check which time zone i'm currently in Linux?
23
votes
2answers
3k views

Slight delay when switching modes in vim using tmux or screen

Switching to and from insert mode in Vim is no longer instantaneous since I use tmux. After pressing Esc in insert mode, it takes a noticeable amount of time to actually get out of insert mode. After ...
23
votes
5answers
17k views

check the physical health of a USB stick in Linux

How to check the health status of a USB stick? How do I know that a USB is broken beyand repair, or repairable?