Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs.

learn more… | top users | synonyms

0
votes
1answer
374 views

Unix: copy files sequentially

As far as I remeber, long time ago I've been using such a thing: in total commander I pressed F2 in copy dialoge - added "copy task" into a "Copy queue". And so, all those files have been copied ...
1
vote
1answer
26 views

Go to directory of symlink file target

How can I create a command (or alias) to go to the directory which contains the target file of a symlink. For example, if I have a symlink symFile@ -> /Users/zhermes/some/dir/someFile I'd like ...
1
vote
1answer
43 views

SSH working but SCP permission denied using the same password

I can successfully SSH into my remote sever (amazon web services if that matters, I'm on a mac) using ssh -i mykey.pem ubuntu@??.??.??.??? But when I try to use scp scp -i test.php mykey.pem ...
44
votes
11answers
10k views

What is the relationship between Unix, Linux, Ubuntu, Debian and Android?

What is the relationship between Unix, Linux, Ubuntu, and Debian? I suspect they are all Operating Systems that are based upon one another - similar to how Windows is based on DOS. Is my suspicion ...
0
votes
1answer
157 views

How to set up a working ssh server on Windows 7 that accepts public keys

What I actually wants it to make it possible to use rsync from an Unix server to backup files on a Windows 7 Ultimate computer. It need to use public keys unattended and I want Unix-style directory ...
5
votes
5answers
5k views

individual cpu % in 'top' output

Usually to view individual cpu % we press '1' in the interactive mode of top. However I am not able to figure out the logic to get the same output in batch mode i.e, top -n1b I am redirecting this ...
5
votes
3answers
310 views

Unix/Linux program that can handle all popular compression/archiving formats (e.g.tar, gzip, bzip2, zip)?

I sometimes get confused by the varying command line options I need to run common Unix archiving and compression software (e.g. gzip, bzip2, zip, tar). Is there a program out there that can just Do ...
41
votes
10answers
29k views

Unix: ls, how to sort first directories then files etc

I would like to use ls command to first show direcotries and then files. I tried ls -la | sort -k 1 But I got a wrong order.
0
votes
1answer
19 views

Detect IPC between running processes on Unix

Suppose I have 2 processes on any unix-based system and I sure they are using some inter-process communication. How can I detect what do they use in order to simulate or hook it? I mean pipes, for ...
2
votes
1answer
719 views

Unix command for recursively copying files

I need a unix command for the following: Directory Structure /project /images /products /cup.jpg /laptop.jpg /designs /alpha.jpg ...
1
vote
1answer
56 views

Why tar hangs failing to extract a file

I am using a Solaris 11 system and am trying to extract from a tar file which I know to be OK, but when I try to extract it, tar hangs. I don't get any feedback from tar. What areas of Solaris should ...
0
votes
4answers
95 views

How do I DELETE a comma and a space from a numeric string using a bash script

Folks, I have asked this question 5 times on here and have received 5 separate bits of code from super users that have all *failed. Problem: I have stock information being brought back into a txt ...
0
votes
1answer
81 views

Missing MySQL extension required to run WordPress on custom Linux server

I need to get WordPress up on running on a custom Red Hat Linux server, but am getting the following error when attempting to visit the WordPress install page: Your PHP installation appears to be ...
54
votes
4answers
76k views

What is the “wheel” user in OS X?

I recently reinstalled iTunes and I noticed something peculiar. The "original" version of iTunes has a user in the permissions known as "wheel" that is set to "Read Only". I dragged this version of ...
0
votes
2answers
62 views

Downloading large amount of files from unix server

there are about 7000000 files in a single directory summing up to a total of 650 GB. (listing them alone is not even possible) what options do i have to download these? i was thinking of using tar ...
1
vote
1answer
61 views

Using cURL command-line tool on Mac, What can I do to this script to ask it to fetch stock data which will replace commas with NO SPACES

Example: Google Outstanding Shares are 670,000,000 and this value is collected in a txt file from Yahoo Finance API via the below script. The issue is; that numbers WITH commas or spaces are a bloody ...
0
votes
1answer
86 views

Linux bash command to list hidden files first, then other files sorted by extension

This page: How can I make "ls" show dotfiles first? lets me list hidden files first, but I also wish to sort non-hidden files by "extension" e.g. all filenames ending with ".png" come after ...
0
votes
1answer
44 views

How can I write a script to kill process that runs for a few hours?

I run python script from cron every hour on CentOS 5 and see some processes keep running for a few hours I would like to run a script every few hours to kill those processes. How can I write the ...
0
votes
2answers
66 views

Unable to get accurate record count of a csv file

I have a .csv file that has some values formatted as paragraphs with line breaks or sometimes bullet points. "STAT","ID","DESC" "UPD", "1", "Updated" "CHG", "2", "Changed" "UPD", "3", "Updated. ...
0
votes
1answer
50 views

“ls -la | sort +0nr -2 +2d” , what does sort do here?

I hae seen this somewhere written: ls -la | sort +0nr -2 +2d What is sort doing here? What are these arguments.
0
votes
1answer
262 views

Recover original timestamp after command line copy

Is it possible to recover the original time stamp (date added, date modified) of files after copying them (command line, cp -r folder) The original files are gone.
1
vote
1answer
23 views

Find the creator of an idle TCP connection

On Solaris (or Unix), how can I find the remote host associated with the creation of a currently idle TCP connection? lsof gives me a bunch of lines like this: java 25375 foo 8161u IPv4 ...
8
votes
3answers
6k views

What is the fastest and most reliable way to split a 50GB binary file into chunks of 5GB or less, and then reassemble it later?

Our servers are running Ubuntu Linux, and the binary file is a BSON dump of a large MongoDB collection. How reliable is a tool like split? Is there a faster or better way to do this?
4
votes
1answer
4k views

Copying from one file to another using nano editor

How do I copy a few lines from one file to another file using the nano editor?
40
votes
2answers
13k views

How to start vim without executing /etc/vimrc?

On my Linux server at work, the admins did not install cscope, and I installed it from source in my home directory and added it to the $PATH. The trouble is, the /etc/vimrc has a reference to ...
4
votes
1answer
3k views

How can I configure Mutt to work properly in Cygwin?

Every time I try to run Mutt in cygwin I get the following errors: Error in /home/JJR/.muttrc, line 4: smtp_url: unknown variable Error in /home/JJR/.muttrc, line 5: smtp_pass: unknown variable ...
0
votes
1answer
21 views

How to fetch the string “Hi there” from the below array in unix

I only want to fetch Hi there and store it in a variable VAR1. So basically VAR1 should contain Hi there VIEW_COL[1]="Hi there,USA,Y" This is what i have tried so far. Column_Display_Name=`echo ...
2
votes
1answer
3k views

time stamp XXXX s in the future issue - touch command (Linux)

When I untar a tar.gz file on Debian Lenny, I get the such outputs: tar: openssl-1.0.1e/apps/openssl.cnf: time stamp 2013-02-11 15:26:04 is 1360584537.139999998 s in the future ...
0
votes
2answers
94 views

Why does sudo fork before executing the process?

This question may seem a bit silly, but since in Unix-based systems, replacing an executable's image is done in a single step, replacing the currently running process, in the function call execve (and ...
1
vote
1answer
35 views

How can I mount NFS file in unix?

I am using Cent OS 5.6 and I have two VMs. I am trying to mount a file but unable to do so. Here's what I have done. Mkdir/uxadm Chmod 777 /uxadm vi /etc/exports /uxadm ...
0
votes
2answers
50 views

Find availble disk space in unix without parsing `df` output

When I type df -k ., I get the following output Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda2 16512936 8650196 7023932 56% / What I do is tail the last line and ...
2
votes
2answers
240 views

#! (shebang) line length limitation

In connection with developing GNU Parallel I seem to have hit a limit in the length of #! (shebang). This shebang-line: #!/bin/echo ...
48
votes
4answers
16k 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 ...
121
votes
5answers
11k views

How does Linux know that the new password is similar to the previous one?

A few times I tried to change a user password on various Linux machines and when the new password was similar to the old one, the OS complained that they were too similar. I always wondered, how does ...
13
votes
4answers
8k views

How can I recursively grep particular files in a directory?

I'm new to linux and grep, and trying to find my way around. By using find -name *.java I am able to find the names of all of the java files in a particular directory. Suppose I want to count the ...
1
vote
2answers
47 views

Why doesn't this Linux symlink work?

I'm trying to create a symbolic link for the file logs inside home/dir1/ to the file netlogs inside home/dir3/. The link is created but when I try to look at the contents of netlogs I got this error ...
0
votes
2answers
33 views

What's the smartest way to copy-rename (backup) several files in different folders at once in the shell?

I want to copy-backup several files in different folder at once before updating ntpd. Example (one file only): sudo cp /usr/sbin/ntpd /usr/sbin/ntpd.old Files: /usr/bin/sntp /usr/bin/ntp-keygen ...
2
votes
0answers
84 views

How can I create a CD or USB key that fully restores a Linux install? (a la the CDs that come with Windows boxen)

Whenever I assemble and configure a Linux PC for someone, I always run into the problem of what happens if they want to restore their system back to the way it was when they got it. Either they ...
29
votes
6answers
16k views

How can I trigger a notification when a job/process ends?

The place I work at has commands that take a long time to execute. Is there a command/utility that I can use to notify me when the command execution is over? It could be a popup window or maybe a ...
4
votes
1answer
104 views

How can I browse through Homebrew's formulae according to popularity (# downloads all time)?

Though I can easily find an alphabetical list of all available formulae, there seems to be no resource online, including at Brew's Github, or seemingly anywhere where I'm able to browse through ...
0
votes
1answer
3k views

Canot format MicroSD. File system is read-only

I formatted it for my special needs some time ago using fdisk. Don't remember the partition table, but there was 1 fat32 and 1 ext4 partition. Now I want to format it fat32 clean, but I get the ...
2
votes
2answers
317 views

force copy when -i is used in bash alias

I have an alias (like most people do, i think) that makes cp cp -i to prevent overwriting. Is there a way I can "cancel" this to force overwriting on a copy function? cp -f does not work.
49
votes
12answers
63k 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): ...
5
votes
6answers
4k views

Split a file into two files at a given line

I'm looking for a way in unix to split a file into two files at a given line number. split -l 100 file_name is close to what I'm looking for, but this command creates multiple files, each of 100 ...
0
votes
2answers
103 views

find /data/oozie-admi/ -type d -ctime +1 | xargs rm -rf [0] command deleted /data/oozie-admi/ folder

/data/oozie-admi/ folder contains multiple directories. This command find /data/oozie-admi/ -type d -ctime +1 | xargs rm -rf [0] deleted /data/oozie-admi/ folder . Need to find out scenarios in ...
3
votes
1answer
66 views

How to collapse all trees in htop?

I would like to be able to collapse all the trees in the default view of htop. Is there a way to achieve that at once, instead of selecting every tree and hitting F6?
6
votes
4answers
3k views

What is the reason for rmdir(1) and rm(1) to co-exist?

I use BSD and Linux every day, I have never had a circumstance which I must use rmdir(1) rather than rm(1). What's the purpose of rmdir's existence?
1
vote
2answers
64 views

Nmap runs slower as root than normal user

I am working on a bash script to enable automatic detection and remote control of my company's proprietary data recorders. The recorders run a custom version of linux and are essentially powerful pis ...
89
votes
9answers
44k views
2
votes
1answer
189 views

Simple find and copy script for linux [closed]

I'm quite a newbie to scripts in Linux. What im trying to get is a simple script that finds a file by its exact name, then copy that file to a different folder. So Essentially it should work like ...