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

31
votes
8answers
8k 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 ...
31
votes
8answers
7k views

Is flash drive wear a significant issue?

My netbook has a flash drive instead of a hard disk drive, and I'm using Ubuntu Netbook Remix with ext3 as the file system. I've read some articles concerning flash drive wear, and the main concerns ...
31
votes
2answers
4k views

Is it possible to compile a Darwin Distro from source, like you can a build a Linux Distro?

I have read through and undertaken Linux From Scratch (and BLFS) and I was wondering, can I follow this guide to create a Darwin Distro by substituting the xnu kernel? Would the process be vastly ...
30
votes
10answers
3k views

Prevent user typing accidental space between rm and wildcard

Intention: rm -rf string* Problem: rm -rf string * The first case is a legitimate and common use of rm, a small typo can cause a lot of problems in the second case. Is there a simple way to ...
30
votes
14answers
33k views

Linux command to repeat a string n times

Is there any built-in linux command that allows to output a string that is n times an input string??
30
votes
2answers
18k views

What does Linux do with existing files in a mount point?

If I attempt to mount a folder that already has files in it, does linux give me an error message or go ahead and show both the mounted filesystem and the files that were already in the folder?
30
votes
5answers
2k views

Deleting millions of files

I had a dir fill up with millions of gif images. Too many for rm command. I have been trying the find command like this: find . -name "*.gif" -print0 | xargs -0 rm Problem is, it bogs down my ...
30
votes
8answers
12k 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 ...
30
votes
7answers
32k views

ls -d is not displaying directories. Is there a way to get ls to only display directories instead of files and directories

Is there a way to get ls to only display directories instead of files and directories From the man page. -d, --directory list directory entries instead of contents, and do not ...
30
votes
3answers
29k views

How to wget a file with correct name when redirected?

So after some time of searching on google and superuser (and scanning man pages) I was unable to find an answer to something that (I think) should be simple: If you go here: ...
30
votes
9answers
38k views

show keys pressed in linux

in windows there is a program called keyboard jedi that shows what keys are pressed on the keyboard. is there an equivalent for linux?
30
votes
4answers
70k views

mount dev, proc, sys in a chroot environment?

I'm trying to create a Linux image with custom picked packages.What I'm trying to do is to hand craft the packages I'm going to use on an XO laptop, because compiling packages takes really long time ...
30
votes
3answers
8k views

In Linux, how do I truncate command-line output?

If I grep -nr sumthin * in my source code directory, it also spews out very long lines from minified JavaScript or CSS files. I want to get just the first 80 characters per line. For example, a ...
30
votes
4answers
3k views

How to use a Linux system as a land phone

I have a land line connection. I would like to receive and make calls using my computer. It is a basic land line connection which also provides broadband internet. I am not asking about VoIP. I ...
30
votes
3answers
55k views

How do I create a 1GB random file in Linux?

I am using the bash shell and would like to pipe the out of the command openssl rand -base64 1000 to the command dd such as dd if={output of openssl} of="sample.txt bs=1G count=1. I think I can use ...
30
votes
7answers
37k views

Batch-convert files for encoding

How can I batch-convert files in a directory for their encoding (e.g. ANSI->UTF-8) with a command or tool? For single files an editor helps, but how to do the mass files job?
30
votes
7answers
12k views

Linux: Continuously synchronize files, one way

Scenario: An IDE is set up on a Linux desktop box, editing PHP files locally. Every time I save a file, I want this change to appear on the linux server where Apache is running. The server has ssh ...
30
votes
10answers
38k views

How to extract text with OCR from a PDF on Linux?

How do I extract text from a PDF that wasn't built with an index? It's all text, but I can't search or select anything. I'm running Kubuntu, and Okular doesn't have this feature.
30
votes
2answers
10k views

What's the difference between “adduser” and “useradd”?

I wonder: Why are there these two commands on Debian Linux, with very similar names and functionality? This has always been confusing for me. Is any of them superior to another? Why aren't they ...
30
votes
3answers
77k views

How do I log out of `sudo su`?

I'm using sudo su to start mysql and do some homework with it. When I finish with mysql (or any other command), then I'm still in sudo. How do I "log out", so my prompt changes back from # to $?
30
votes
6answers
99k views

How do I select all text from a file with nano?

I open a file in Ubuntu nano editor from the comand line and I want to copy all the contents of the file so I can paste it in an another application outside the shell. So far I can only copy using ...
30
votes
8answers
27k 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 ...
30
votes
5answers
13k 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 ...
30
votes
6answers
15k views

Triple (3) Monitors under Linux

I have a 3 monitor setup (each 1680x1050) via an Nvidia NVS440 (2 GPUs, 2 outputs per GPU totalling 4 outputs); this works fine under Windows XP,7 but caused considerable headaches under Linux (Ubuntu ...
29
votes
4answers
3k views

Windows vs Linux Local Time?

Ever since I started using Linux in dualboot with Windows I noticed that when I rebooted the machine, the time on the other OS was wrong, e.g. it was 12:00 on Linux, then I rebooted and on Windows it ...
29
votes
6answers
11k 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 ...
29
votes
9answers
70k 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.
29
votes
5answers
100k views

How to reinstall GRUB2 EFI?

After successfully updating my bios, something went wrong and I ended up with a blinking cursor on the top left corner of a black screen. No errors, no nothing. The bios now only listed a SATA: ...
29
votes
4answers
24k 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 ...
29
votes
6answers
36k views

How can I view results of my cron jobs?

I see so many guides on how to run crontab, but what I need right now is to learn how to Find log files about cron jobs Configure what gets logged
29
votes
8answers
9k 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 ...
28
votes
5answers
45k views

How do I get the size of a Linux or Mac OS X directory from the command-line? [duplicate]

What command do I use to find the size of all the files (recursively) in a Linux or Mac OS X directory?
28
votes
1answer
87k views

Give write permissions to multiple users on a folder in Ubuntu

There is a folder that is owned by user tomcat6: drwxr-xr-x 2 tomcat6 tomcat6 69632 2011-05-06 03:43 document I want to allow another user (ruser) write permissions on document folder. The two ...
28
votes
6answers
22k views

How many cores I am using on a Linux Server?

I am just wondering how I can find out in bash how many CPU cores a user is now using on a Linux Server? I am submitting a fair amount of background jobs to the server, so I'd like to write a bash ...
28
votes
4answers
32k views

How do I do a binary diff on two identically sized files under Linux?

I have two identically sized files, and I need to do a binary diff to check whether they're the same. I'm currently runnnig diff file1.img file2.img but it's taking quite a while to process my ...
28
votes
5answers
91k views

How can I add a regular user to the sudoers file?

How can I add more users to the "sudoers" file?
28
votes
2answers
23k views

List files bigger than filesize specified

How can I make ls (or any other particular command) to list me only files bigger than a specific file size?
28
votes
2answers
15k views

scp between two remote hosts from my (third) pc

I have two remote hosts. host1-> 10.3.0.1 host2-> 10.3.0.2 Both run an ssh server. The ssh server listens on port 22 in host1 and on port 6969 in host2. Now, using my local machine, I need to copy ...
28
votes
4answers
23k views

How do you redirect wget to standard out?

I have a crontab that wgets a PHP page every five minutes (just to run some the PHP code), and I want to send the output to standard out. I couldn't find it in the wget manual. I'm looking for ...
28
votes
2answers
26k views

Can GNU Grep output a selected group?

Is it possible to use GNU grep to get a matched group from an expression? Example: echo "foo 'bar'" | grep -oE "'([^']+)'" Which would output "'bar'". But I would like to get just "bar", without ...
28
votes
5answers
3k 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 ...
28
votes
2answers
10k views

What's the difference between “su” with and without hyphen?

I'm quite new to Linux terminal and I'm not quite sure what the difference between su with a hyphen and su without a hyphen is, for example: su - username vs. su username. I looked into the ...
28
votes
2answers
11k views

How to run a minimal Linux inside a running 64-bit Windows 7

On my previous Windows Vista laptop, I used to run Portable Ubuntu Remix for Windows, which is based on coLinux, like the similar andLinux. This worked fairly well with limited system resources (a ...
27
votes
6answers
59k views

play mp3 or wav file via Linux command line

I would like to make an alarm system backed by a Ubuntu (no graphical interface) box, which plays various announcement and alarm audio tracks (.mp3 or .wav) via the command line. For example: $ ...
27
votes
4answers
2k views

How to create a file which is named like a command line argument?

I was wondering how to make a file named as a flag, e.g., if I wanted to make a folder named -a, what commands would do the trick? I tried mkdir '-a', mkdir \-a, and neither worked. I'm on Ubuntu.
27
votes
8answers
41k 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 ...
27
votes
4answers
17k views

Looping Through Subdirectories and Running a Command in Each

I have a set of repositories sorted into directories based on their VCS (Git, Mercurial, SVN). With Subversion I was able to run svn update * in the parent directory and it would loop through each ...
27
votes
8answers
63k views

How to get parent PID of a given process in GNU/Linux from command line?

Resolved before asked: cat /proc/1111/status | grep PPid
27
votes
4answers
28k views

How do you find the parent process of a zombie process?

How do you find the parent process of zombie processes? When the child process is something where the parent is not entirely obvious... Is there some way to list processes in tree format or ...
27
votes
6answers
59k 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 ...