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
3answers
14k 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.
31
votes
8answers
6k 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
3answers
12k views

Bad font anti-aliasing in Ubuntu

I'm switching from Fedora 8 to Ubuntu 9.04, and I can't seem to get it to get a good font anti-aliasing to work. It seems that Ubuntu's fontconfig tries to keep characters in integral pixel widths. ...
30
votes
5answers
36k views

what does the asterisk mean after a filename if you do ls -l

I've done an ls -l inside a directory, and my files are displaying like this : james@nevada:~/development/tools/android-sdk-linux_86/tools$ ll total 9512 drwxr-xr-x 3 james james 4096 2010-05-07 ...
30
votes
3answers
24k 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.
30
votes
3answers
79k views

How does one change user's home directory in Ubuntu 9.04?

Does anyone know how I might change my home directory in the shell please?
30
votes
6answers
50k views

Bash script to delete files older than x days with subdirectories

I'm trying to delete a ton of files older than x days. Now I have a script to do that find /path/to/files* -mtime +10 -exec rm {} \; But this will also delete the subdirectories. There are a ton ...
30
votes
1answer
18k 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: ...
30
votes
3answers
3k views

Can history files be unified in bash?

I routinely run multiple screen sessions on my Linux desktops and servers. A problem with this is that when I grep through my command history, I find I issued a command in a different session, and ...
29
votes
5answers
1k 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 ...
29
votes
3answers
12k 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 ...
29
votes
5answers
36k 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 ...
29
votes
4answers
99k 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 ...
29
votes
3answers
17k 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 ...
29
votes
1answer
51k views

How do I unzip a tar gz archive to a specific destination?

I want to unpack a .tar.gz file to a specific directory. The archive file is in /root/Documents. I want to unzip it into /root/Desktop/folder. The folder structure in zipped file should be preserved ...
29
votes
7answers
33k 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?
29
votes
8answers
7k 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 ...
29
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 ...
29
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 ...
28
votes
8answers
34k 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.
28
votes
8answers
6k 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 ...
28
votes
6answers
20k 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
9answers
18k 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 ...
28
votes
5answers
45k 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 ...
28
votes
2answers
30k views

How can I create a non-login user?

I'd like to create a user and a group both called subversion on a RHEL 5 system. I looked at the man page for useradd and I guess the command would be just be... useradd subversion However, not ...
28
votes
3answers
8k 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 ...
28
votes
4answers
54k 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 ...
28
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 ...
28
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 ...
28
votes
11answers
86k views

PuTTY Network Error: Software caused connection abort

I have a strange problem: When I'm using PuTTY with SSH connecting to a Linux server hosted in VMware on my local Windows 7, I often get the error saying "Network error: Software caused ...
28
votes
1answer
33k 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 ...
27
votes
3answers
2k 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?
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
3answers
65k 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 ...
27
votes
4answers
16k 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?
27
votes
4answers
19k 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 ...
27
votes
6answers
76k views

Add permanent SSL certificate exception in Chrome (Linux)

I have a problem with a website that has an SSL certificate which doesn't correspond to the website domain. Chrome gives me a warning for this website (and rightly so), which I have to ignore ...
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, ...
27
votes
4answers
12k views

What is the different between 'locate' and 'find' in Linux?

Why there are two so similar command in Linux? and normally what are the circumstances to use each of them?
27
votes
7answers
21k 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 ...
27
votes
5answers
8k 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 ...
26
votes
2answers
4k views

Why is it so hard to find a file in Ubuntu?

It's very hard to find files in Ubuntu. In Windows, you could just go to C:\Program Files and you would find what you need. In Ubuntu, you must use search to find something you need. Maybe I am ...
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
7answers
22k 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 ...
26
votes
6answers
10k 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 ...
26
votes
7answers
159k 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 ...
26
votes
7answers
5k 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 ...
26
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 ...
26
votes
9answers
60k 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.
26
votes
10answers
14k 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?