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
0answers
4 views

Unix environment variables for Unix-derived apps in Windows

My problem is that cross-platform apps initially written for Unix/GNU+Linux trash my Windows filesystem by placing files wherever they can. In most cases this can be solved by setting environment ...
0
votes
0answers
4 views

How do I make less open binary files without confirmation?

I have several log files that contain a few bytes which are not displayable characters (due to binary signatures on the requests). Every time I open them with less I get asked: $ less ...
0
votes
0answers
3 views

Installing APK's through mobile terminal ide?

I was wondering if you could manually install apks that are downloaded onto the SD card of my android tablet. I'm looking for something similar to the sideload command when connected to a computer. I ...
1
vote
2answers
27 views

Compare two files and output the differences

I am aware of diff and using loops but I just cant seem to really get what I need with diff. I'm basically looking to compare two files (file2.txt and file2.txt) and just get the output of what is ...
2
votes
0answers
19 views

How to pick the shortest proper prefix from the stdin

Prelude: Here the "prefix" has the normal meaning, e.g., string 'abcde' has a prefix of 'abc'. Here is my sample input $ echo -e '/home/dave\n/home/dave/file1\n/home/dave/sub2/file2' /home/dave ...
0
votes
1answer
18 views

including timestamp in file name

I tried to create a file like this to put a timestamp in the file name vim Customer1-$(date).txt The result was Customer1-Sat.txt, however, I wanted the full timestamp Sat 30 Aug 2014 09:41:27 PDT ...
0
votes
0answers
15 views

Free Linux server to work with [on hold]

Is there a free/cheap Unix/Linux personal server available to connect using tool like Putty to learn shell scripting. I could not find one by googling
-1
votes
1answer
20 views

Is there a GUI tool to convert a Windows path to Unix path, preferably taking into account drive mapping? [on hold]

I'd like a small Windows GUI tool, Explorer plug-in or something similar to convert a Windows path to a Unix path, preferably expanding the drive letter if the Windows path contains a drive that is in ...
4
votes
2answers
141 views
+50

Why does the root directory / has a reference to its “parent”?

I'm currently developing a fake filesystem for a browsergame. I recently implemented ".." and "." folders so every folder has a reference to its parent. Then I checked in my terminal if "/" also has ...
0
votes
0answers
29 views

ksh script using if break statements

I have a script file that has the server details like set -A SERVERGRPS SERVERS_CA SERVERS_NY set -A CA ca126 ca546 ca 642 set -A NY ny112 ny113 ny114 now I have to write a another script which ...
0
votes
1answer
27 views

Linux bash iterating and Break

I have two server groups SERVERS_CA AND SERVERS_NY. I will have a array something like SERVERGROUP=(CA NY) CA and NY will have set of servers in arrays like CA=(ca126 ca546 ca 642) NY=(ny112 ny113 ...
0
votes
1answer
28 views

Cannot change directory into home directory, although permissions are set correct

I guess I need some help from an advanced Unix user... On a Ubuntu System I did something stupid. I typed sudo chmod 774 .* or the like, in a subfolder of my home folder and then I suddenly could not ...
0
votes
1answer
11 views

Tar withour directory structure and exclude folders

I am trying to create a tar file to exclude certain folders and then I want to have a tar file without the parent directory structure. I am able to exclude folders, but when I extract I see path from ...
1
vote
1answer
33 views

boot2docker mount windows share

I am running boot2docker on windows and I am trying to access a shared folder on my host from the VM. I have executed the following sudo mkdir /mnt/docktest sudo mount -t cifs ...
2
votes
2answers
145 views

Copying folder from one Unix server to another, updating owners IDs

I'm using the method described here to copy a directory from one Unix server to another (both Ubuntu 14.04): rsync -aruv localfolder/ user@server:destination/ I need to keep the same owners and ...
-1
votes
0answers
15 views

Direct Loging to a putty server

I am using the following to login automatically to a remote server and then run commands listed in a commands.txt, like this: start putty -l username -pw password -m commands.txt but it gives an ...
0
votes
1answer
28 views

How can I get more information from Curl regarding a FTP 425 “Cannot open data connection” error?

I am trying to upload a file with the following line: curl -3 --ftp-pasv --ftp-ssl-control -v -i -T ./mybigfile.gz ftp://lawrence@mecloud.xxxxxxx.co.uk:21/OnlineBackup/Lawrence/ --insecure -u ...
0
votes
0answers
13 views

Unix Multi-Group Permissions

I am trying to do permissions to a folder for multiple groups, each will have different permissions to the directory. Can you let me know how to do this without editing the ACL's? Group 1 RW Group 2 ...
0
votes
0answers
7 views

Message queue doesn't exists any more after reboot/shutdown of the virtual machine (Ubuntu)

I'm working on a simple multithread client/server program in C using native message queue of unix to send messages from one client to another. It works fine, but my problem is that after a reboot or ...
0
votes
1answer
30 views

Memory usage of a process in a shell script

I want to find out the memory usage of a process in a shell script.I tried to use this piece of code : while[process] do if [ -e /proc/$pidno/statm ]; then m=`awk '{OFS="\t";print ...
0
votes
0answers
15 views

UNIX command tcpdump for certain filetypes like xml

I use the unix command tcpdump with these extensions -A -s0 -ien0 port 80 I know how to add, for example a new host, that would be and \ host random.com Can i sniff for certain filetypes? I have ...
1
vote
3answers
122 views

Creating a large file of random bytes quickly

I want to create a large file ~10G filled with zeros and random values. I have tried using: dd if=/dev/urandom of=10Gfile bs=5G count=10 it creates a file of about 2Gb and exits with a exit status ...
0
votes
1answer
27 views

What is the easiest way to convert a bunch of text files from LF (Unix) to CRLF (Windows) in a single run?

There is a directory tree on a Windows7 machine containing a few hundred text files that I want to convert from LF to CRLF. I already found a Win32 version of UNIX2DOS but that one accepts only one ...
0
votes
1answer
24 views

Iostat and top show static resource usage on first value

For one of my projects, I need to obtain resource (CPU, I/O and disk-space) usage programatically. Currently I'm running shell commands (iostat) and parsing the results which works relatively well ...
6
votes
1answer
255 views

Multiple unix pipes not working

This first pipeline works fine (printing "c"): echo "a" | sed 's/a/b/' | sed 's/b/c/' This one does not do what I expect (nothing gets printed when I feed an "a" into my fifo ): mkfifo fifo; cat ...
0
votes
0answers
27 views

Why isn't the loop back interface replying to injected ICMP echo request?

I want to be able to send IP packets from a userspace program and receive responses on a TUN interface. To test, I'm injecting ICMP icho requests to the loopback interface from a user space ...
0
votes
1answer
34 views

Unix BIOS/Boot Record on USB Flash Drive

I have been trying to learn a bit more about USB drives, and am curious about their MBRs. Essentially, I open up the device file of the USB drive and give a hex dump of the first 496 bytes of the ...
0
votes
2answers
38 views

Delete Directories that Contain Specified File in Mac OS X

How do I delete a folder that contains a file or folder with a specific name? E.g. I want to delete all folders that contain the file "things.txt": /dirA/ /dirB/things.txt /dirC/ /dirD/things.txt ...
0
votes
0answers
29 views

Using Tap/Tun to intercept packets at IP level

I am working on a research project involving ARP poisoning. I would like to intercept packets on the IP level. If my machine receives a packet with an IP address not destined to it's own IP ...
66
votes
6answers
3k views

Choosing between .bashrc, .profile, .bash_profile, etc [duplicate]

This is embarrassing, but after many years of using POSIX systems full time, I still have a hard time figuring out if a shell customization should go in .bashrc, .profile, or somewhere else. Not to ...
1
vote
2answers
44 views

How do I delay tcp traffic on a socket?

I would like to test the interactions between a client program and a server program for race conditions. They connect to each other via tcp. The client does blocking calls to the server on multiple ...
0
votes
0answers
15 views

0711-317 ERROR: Undefined symbol

I am installing a C package named expat-2.1.0 in AIX 6.1 machine. While performing a gmake it popping the below output. /bin/sh ./libtool --silent --mode=compile gcc -std=gnu99 -I./lib -I. -g -O2 ...
1
vote
1answer
33 views

how to create ubuntu installable iso image from files

this might be a quite silly question but I lack linux knowlege so here it is... I have an ubuntu VPS from which I need to create a development environment under my WMWare. So I wonder if the ...
0
votes
2answers
53 views

How to ignore a specific SMART error

I get an email about the same SMART error every day. I'd like to configure the SMART daemon to ignore this specific error, but only this, since I still want to now if anything changes or gets worse. ...
0
votes
0answers
23 views

How to get the status of VGA device

Currently I am using vga2usb device for capturing output from the virtually any VGA source such as tab or any another monitor. If I connect this vga2usb device to my Ubuntu machine then we are ...
3
votes
3answers
50 views

Sed replace only in even numbered lines of a file when replace commands are written in a file

I have all the replace commands in a file (say replace.sed) and i use it with -f flag of sed (sed -f replace.sed InputFile). But now i ran into a condition where i need to apply these replace rules ...
2
votes
1answer
63 views

wc / cat command not found

I'm trying to run some simple bash script which uses wc and cat commands. The script fails with this: wc: command not found or this (after I commented string which uses wc): cat: command not found ...
0
votes
0answers
34 views

Configuring Apache with PHP-FPM, Apache failed to start

I followed this guide to configure PHP-FPM with Apache on my server but after I restart Apache successfully: [root@localhost vhost]# service httpd restart Stopping httpd: ...
0
votes
1answer
36 views

tar -czvf with no output file

Say you run tar -czvf some_folder_here and don't actually specify an output file, like tar -czvf some_output_file.tar some_folder_here. Where does the file go? I just ran this by accident, and the ...
0
votes
1answer
35 views

Solaris 11.1 x86 installing Weblogic 12.11

Ive been looking everywhere for a way to install Weblogic on Solaris. According to Oracle's documentation, all you need to install Weblogic Graphical Mode is Login on Unix Go to the directory that ...
1
vote
2answers
44 views

Retrieve secure copy in UNIX?

Is there a way to retrieve a secure copy in UNIX? Why would I need to do this? Because I can login to a remote machine from my local machine, but not the other way around. So I need to retrieve a ...
-1
votes
1answer
38 views

how to retrieve following error when i execute shell script

I have one script to log into remote server.But i tried to Execute the script some error occur. Logs: My script: #!/bin/bash S1=$(ssh -t selvam-odc-shell1 "users | wc -w ") S2=$(ssh -t ...
0
votes
0answers
20 views

-t, -T and/or -t -t options for ssh are not stopping stty errors

I've googled this error (which is a pretty common error) ad nauseam, but none of the solutions are working. Disabling pseudo-tty allocation nor forcing pseudo-tty allocation work for me. I always ...
1
vote
1answer
25 views

NetBIOS replying only to external requests

I have some IPs on the internal network I'm 100% sure have netbios enabled. (I say "internal network", but all the IP octets differ. It is just the same institution and geographical location). If I ...
2
votes
1answer
20 views

create a doskey like ~ in unix

I'm writing a small little BAT file that has the ability to create doskey's (alias) like those in Unix. for example: doskey cat=type $* doskey ..=cd.. I just want these BAT files so I can put them ...
-1
votes
1answer
28 views

I'm not able to access my remote machine without password

I am working on Free BSD and I need to connect to my remote machine without password. I tried the following but I can't log into the remote machine without password. Logs: ssh-keygen -t rsa scp ...
0
votes
3answers
23 views

How does UNIX know which private key to look for?

I have a public/private key pair. I put the contents of my public key into my server's .ssh/authorized_keys file. When I SSH into it, it automatically recognizes my key and lets me in. However, if I ...
-1
votes
1answer
55 views

Logging in to putty by sesu as superuser and running commands

I need to automate using a bat file where I need the following things to be done: log in to server using putty/plink sesu to super user run certain commands get the outpout in a text file I can ...
0
votes
2answers
53 views

Unable to SSH, cannot create /dev/null/.ssh

I am trying to deploy hadoop with a master and slave node. But the master fails to start tasttracker and datanode processes in slaves, as it is not able to ssh into slaves. The error message is 'Could ...
2
votes
1answer
65 views

Allow user to traverse path to given directory

Say, I want to give a user colleague read access to a directory /rather/long/path/to/the/directory, but not necessarily to its parent directories. As explained for example here and there, I first ...