3
votes
6answers
977 views

Add consecutive numbers succintly and elegantly to index lines

I usually do this $ wc questions 33 36 3105 questions $ seq 1 33 > nums $ paste nums questions 1 Content 2 ... . . 33 End Content but I feel there could be faster way to do ...
0
votes
2answers
1k views

Need help to make rows into column with awk or sed

Recently, I look for scripts to take this: This; Is; First; Line; and make it like: This Is First Line
3
votes
1answer
630 views

passing file as a parameter with sed and loop

Here File1 is the template. File2 is a csv with 200 rows with the columns scriptname ,jobname, templatename, location The templatename is column with in the file2. Is it possible to do it as below. ...
2
votes
1answer
1k views

Is there a shell utility for printing the contents of a plist? Preferably for a jailbroken iOS device?

I need a tool that prints the actual text in a plist file (plutil changes the format, cat prints gibberish, and there is no defaults command for iOS). It needs to be in a script, so text editors don't ...
1
vote
1answer
145 views

Why are directories created with permissions 2070 and files with 060 in a directory with setgid bit?

I have the following directory: $ ll -d neptune drwxrws---+ 5 beamin psych 4096 Mar 7 16:18 neptune $ getfacl neptune # file: neptune # owner: beamin # group: psych # flags: -s- user::rwx ...
2
votes
1answer
730 views

Can I have conditional statements, based on server, in .htaccess file?

I have a dev server and live server, both running my site on Apache. In my .htaccess file, in addition to lots of mod_rewrite commands and other important things, I also have Auth access control for ...
2
votes
2answers
187 views

Why is my /home separate from /?

I was confused why I was getting out of space errors so I ran df and saw this: [me@fedlap /]$ df -h Filesystem Size Used Avail Use% Mounted on rootfs 43G ...
1
vote
2answers
3k views

How to make changes to /etc/profile take effect

I am trying to change $GRAILS_HOME from /usr/grails-1.3.7 to /usr/grails-2.0.0 If I just do export GRAILS_HOME=/usr/grails-2.0.0 it doesn't persist when I log out and back in. I found a line in ...
11
votes
4answers
53k views

Finding text between two specific characters or strings

Say I have lines like this: *[234]* *[23]* *[1453]* where * represents any string (except a string of the form [number]). How can I parse these lines with a command line utility and extract the ...
2
votes
2answers
286 views

change owner of a file and it's parent directories

I have a file that has 10 parent directories. When I change the file's owner with chown command new owner still can't write to file because the file's parent directories still have a different owner. ...
7
votes
2answers
74k views

Installing git “sudo: apt-get: command not found”

I am trying to install git. I run the following command: sudo apt-get install git-core git-gui git-doc But receive the following error: sudo: apt-get: command not found What should I do?
4
votes
2answers
2k views

What are the reasons Slackware still refuses to include PAM?

I know that Pat Volkerding didn't include PAM back in the day when it was considered by some to be messy or inconsistent, although that doesn't really seem to be the case today with PAM being ...
3
votes
1answer
866 views

Toggle touchpad in HP ProBook 4530s

I have a small problem. I installed Ubuntu 11.10 on my HP laptop and among some problems, I'm trying to solve a touchpad problem. It's working, but I can't toggle it on/off. In Suse Linux Enterprise ...
0
votes
2answers
675 views

Which AIX command's output is this?

Disk Path P Location adapter LUN SN Type Size LSS Vol Rank C/A S Connection port RaidMode ------- ----- - ----------- ------ ----------- ...
3
votes
2answers
8k views

How to interpret an octal or hex dump of a binary file?

The binary file has strings and some numbers, If I do od -c filename or strings filename, I can see the strings properly. But, what about numbers? They are in some weird format. The text after doing ...
2
votes
3answers
956 views

Is there a way to identify which process turns into Zombie process

One of the ubuntu server has 82 zombie processes. All processes shows '[sh] defunct' as process command. Is there a way to find out which process is becoming a zombie process? I tried checking the ...
1
vote
3answers
147 views

Backup Ubuntu as an installer

I'm using ubuntu since 2007/8 and still I use the same system with upgrading it. I'm not a person who good in linux but developing under linux. Now I want to format the system and re install a new, ...
3
votes
1answer
4k views

Where to supply authentication details to the Network Proxy (Central Proxy) on Fedora?

My system is running Fedora 16 and I live in a campus where we use LAN to connect to the Internet. And for this, we use an http proxy with authentication (username & password). I tried putting the ...
0
votes
1answer
895 views

zlib support for PIL won't work

I'm trying to install PIL as per its instruction on debian but can't figure how to fix this bit: I get --- ZLIB (PNG/ZIP) support available on build_ext and * ZLIB (PNG/ZIP) support not installed on ...
2
votes
0answers
672 views

How to make titlebars in XFCE bigger?

No matter how big font I set for titlebar, the height of the titlebar is not changed at all. I don't see any editbox where I could enter the desired height of titlebar. So far, I only found ...
1
vote
2answers
6k views

Problems with CMake in CentOS 6

I try to install a software in CentOS 6.2, without success. In README file it says: Requirements: - qt4 gui lib version >= qt4.6.x Note that many linux distributions split packages into a ...
3
votes
1answer
6k views

Running VLC from a cronjob: How to get a DBUS connection?

I'm trying to run VLC headless from a cron job. The idea is to grab single images from a RTSP stream every two minutes and (later, and in another script) ftp them to a distant machine. The command ...
0
votes
1answer
671 views

/run in Debian Squeeze

I'm running Debian Squeeze (6.0.1) on a NAS (LinkStation, mipsel). I installed minidlna from unstable and noticed the daemon won't start because it can't create /run/minidlna. After a little googling ...
0
votes
1answer
43 views

Is the process of backing-up a database and sending the generated CSV to a remote server easier on Windows or Linux? [closed]

My employers currently use a Windows IIS Database server which I am trying to change to Linux. But I need to convince them. There is a requirement to automate a process of backing-up the database ...
9
votes
3answers
4k views

Why does awk do full buffering when reading from a pipe

I'm reading from a serial port connected to a gps device sending nmea strings. A simplified invocation to illustrate my point: $ awk '{ print $0 }' /dev/ttyPSC9 ...
2
votes
1answer
2k views

How to measure an operation's duration in terminal, not in code

For example, I need to do "make " for some software. I want to measurement how long this is going take. Is there easy and accurate way to do so?
3
votes
1answer
508 views

Can I force notify-send to appear on a different monitor?

I am using notify-send to present occasional information to my users. However, in a two-monitor setup, notify-send always maps the window in the lower-right corner of the right monitor. The users ...
7
votes
4answers
7k views

Diff several files, true if all not equal

I have a number of files, I want to check that all those files have the same content. What command line could I use to check that? Usage could be something like: $ diffseveral file1 file2 file3 ...
7
votes
4answers
3k views

Find files with same name but different content?

I want to generate a list of files that have: Same name Different content in a directory (including all children directories and content). How to do? Bash, perl, anything is fine. So, two ...
1
vote
2answers
4k views

How to write a file at various offsets to a filesystem partition with dd command

Requirement I want to write a file at various offsets into the partition Partition /dev/part2 is mounted at /mypart I tried the command below: dd if=/dev/urandom of=/mypart/aaa bs=1024 seek=0 ...
22
votes
2answers
11k views

How can I populate a file with random data?

How can I create a new file and fill it with 1 Gigabyte worth of random data? I need this to test some software. I would prefer to use /dev/random or /dev/urandom.
0
votes
3answers
223 views

What happened to my ext3 partition

I had an ext3 partition. I ran a dd command like this: dd if=/dev/urandom of=/dev/part2 bs=1024 count=15000 seek="various values" Where various values are basically 0, 15000K, 30000K etc. The ...
3
votes
1answer
692 views

Port Mirroring in Fedora? [closed]

I have set up an application that listens constantly to a port for network packets, and I would like to create another one that receives the same network packets ( for use as a test bed). Getting the ...
3
votes
2answers
2k views

How to disable clicking in Seagate ST3000DM001?

Recently I bought this disk and I cannot get rid of funny clicking -- funny because normally not configured disk make dry click. This one make click like a sweet chirp. But besides this, this click ...
3
votes
3answers
4k views

How to show full names on desktop in XFCE?

I am new to XFCE so forgive me if I am missing something dead simple, but... Let's say I have an icon on desktop "personal folder". What I actually see is the icon and "perso..." -- so the question ...
0
votes
1answer
165 views

Python set up on mac

My /usr/bin contains the following installs of python lrwxr-xr-x 1 root wheel 76 Nov 18 06:17 pythonw2.7 -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/bin/pythonw2.7 ...
21
votes
4answers
27k views

How can I update to a newer version of Git using apt-get?

I've just set up a new machine with Ubuntu Oneiric 11.10 and then run apt-get update apt-get upgrade apt-get install git Now if I run git --version it tells me I have git version 1.7.5.4 but on my ...
0
votes
1answer
1k views

Extracting a file attachment from an email message and saving it to a file?

I have an email stored in plaintext (yes, headers, messages, attachments, everything in one plaintext file) and I'd like to extract a PDF document from it. I've copied the base64-encoded text, then ...
3
votes
4answers
487 views

Local area network without using the IP protocol in Linux

I've read a little about Internet protocols and deduced that on local area network, there is no need to use the IP protocol, though it's normally used. Is there a possibility to turn off the IP ...
-1
votes
1answer
81 views

How can I list all files in a Linux directory that holds basic commands and shells used by root and other users using a full path? [closed]

I know I'll be using the command ls but I don't know what holds the basic commands and shells used by root and other users using the full path.
1
vote
3answers
948 views

dircolors “missing second token”

I'd like to customize the colors of ls and as far as I understand the way to go is with dircolors. I did: dircolors > ~/.dircolors Immediately after this I launch a terminal and get this error: ...
1
vote
1answer
46 views

Setting up a mail server to simply be able to see emails sent

I'm writing an application right now that simply sends emails. All I'd like to be able to do is see clearly that my application is, in fact, sending email and that I'm getting the included attachment. ...
3
votes
1answer
997 views

Proper management of ld.so.conf and shared libraries

I'm curious as to how other Linux admins manage /etc/ld.so.conf and in general, shared libraries across multiple Linux servers. We have about 30-40 Linux servers running SLES 11. Since they are ...
1
vote
2answers
65 views

How to capture the adress an application contacts?

An application contacts an Internet host on each start of it. It seems to take just an instant. I don't know if HTTP, plain TCP or UDP or what is used but tend to suppose HTTP. What a tool can I use ...
2
votes
1answer
140 views

Why does SELinux allow me to read this file?

I appear to be misunderstanding the security levels/categories within SELinux. I have attempted to configure a file that I have read access to (via DAC), but no read access to via SELinux categories. ...
3
votes
3answers
4k views

Fixing broken packages in a Debian testing distribution

I'm playing around with Linux Mint Debian Edition (LMDE) in a VirtualBox instance to try it out and see if it'd be good for a main operating system for me. I'm pretty competent with most system ...
6
votes
2answers
15k views

Unable to delete file, even as root

I've got a file on remote machine (saying that, cause I don't know who the heck created it), that I've to remove. user@machine:~/folder$ ls lift_proto.db.lock.db And permissions are like this: ...
13
votes
4answers
24k views

No framebuffer device: how to enable it?

I'm trying to make a PCMCIA tuner card work in my headless home server, running Debian Squeeze. Now, as I have very big troubles finding the correct command line to capture, transcode end stream the ...
3
votes
1answer
193 views

How are loaded SSH keys referenced by name?

I'm using chef's knife ec2 tool which requires the name of a loaded SSH key (that was created in the Amazon EC2 control panel) It seems strange to me that it uses a name to reference the keypair - ...
1
vote
2answers
363 views

What is the real-world use of the bg command?

This is the output: [USER@SERVER ~] ping localhost PING localhost (127.0.0.1) 56(84) bytes of data. 64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.037 ms 64 bytes from localhost ...

15 30 50 per page