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
20 views

Understanding fdisk -l output and calculating storage

I have basic understanding of disk. (Please correct me if i am wrong) I understand on 1 platter, there are 2 heads, 1 on top, and 1 on bottom. Both side of the platter is able to provide storage ? On ...
0
votes
1answer
23 views

Bash - enable execution only if script is run from a specific directory

I need to write a shell script that can only be executed if it is run from the home directory of the currently signed-in user, and I have no idea how to check that from the script itself. Any help ...
0
votes
2answers
19 views

How to reflect changes in PATH as done by a user script

I have a script which does some basic root PATH integrity check and inputs a line in ~/.bash_profile to source my script, so that changes my script made in root's PATH is permanent across restarts: ...
0
votes
0answers
6 views

Proxy to network interface based on port

I'm looking for http proxy, which will forward traffic to the specific network interface. Example: Client connect on port 5000 - forward to eth0 on port 80 Client connect on port 5001 - forward to ...
1
vote
1answer
38 views

udev symbolic links - where is /dev/sda pointing to

It is said that udev create symbolic links identifying the actual device and /dev/disk/by-uuid is an example. [root@centos1 by-uuid]# pwd /dev/disk/by-uuid [root@centos1 by-uuid]# ls ...
0
votes
2answers
28 views

udev - am i using it, where do i see it?

It is mentioned that udev present devices in /dev for devices that are presented to the kernel and it is use to create persistent naming. I have having 2 harddisk /dev/sda /dev/sdb. How does ...
0
votes
1answer
21 views

grep returns no results

Came up to a strange problem - was running a trivial command grep -F "INSERT" new.sql >& output.txt on a new.sql that is 76MB large. The funny thing here is that none results are returned ...
0
votes
1answer
14 views

why do i keep getting the same $SHELL even i am on a different shell already

[oracle@SJOAM ~]$ echo $SHELL /bin/bash [oracle@SJOAM ~]$ sh sh-4.1$ echo $SHELL /bin/bash sh-4.1$ csh [oracle@SJOAM ~]$ echo $SHELL /bin/bash Why am i always in bash !? but the prompt are already ...
0
votes
3answers
35 views

Is it possible to cd with command line through a folder to a shortcut

I have a shortcut to a folder on my Desktop (as I don't store files directly on it). Is it possible to get to the directory the shortcut points to when I am in the desktop on command line? I would ...
0
votes
4answers
78 views

How to open tar gz file created using tar piped to gzip

I wanted to generate a tar gz file with the highest compression level, and I followed the solution from http://superuser.com/a/546509/461740: tar cv /path/to/directory | gzip -9 > file.tar.gz ...
-1
votes
1answer
25 views

How to pass STDIN to wall in OS X?

https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/wall.1.html The OS X man page seems to be almost identical to the Linux one, at least at the beginning, wherein it ...
1
vote
2answers
53 views

Downloading a file from website - what port will be used?

If I go to a website and click on a link to download a file, what will be the protocol that is being use? Is it still HTTP? Will the source port and destination port remain the same? E.g. client (src ...
0
votes
2answers
30 views

Guide to writing command documentation [on hold]

I am looking for a set of guidelines how to document a Unix/Linux command. For example that argument names are surrounded by <>, optional parameters should be in [] and so on. Where can I find ...
0
votes
1answer
34 views

Accidental recursive cp -R, now can't delete file using either Trash or rm

After a mistype in a path when using cp, I seem to have accidentally copied the folder in to itself recursively, and now I can't delete that folder using rm -rf, or the Trash in Mac OS X Finder. The ...
0
votes
1answer
21 views

single user vs multi user mode (without networking) init level 1 vs 2

I tried init 1 (single user mode) and i am still able to switch between users. So this leads me to think that maybe other users is not able to login if i have a network (hence single user mode) Then ...
1
vote
1answer
29 views

understanding Stats on folder in Linux

This is my stat output on a folder stat Downloads/ File: `Downloads/' Size: 4096 Blocks: 8 IO Block: 4096 directory Device: fd02h/64770d Inode: 259595 Links: 3 What does it ...
0
votes
1answer
17 views

How to get files created in last 5 days and form a list for informatica source

Find all the files of the format yyyymmdd_test.txt created in last 5 days. The file may not be available or created for a day in between as well. i.e. for 5th june if following are the available ...
1
vote
1answer
27 views

xclock not showing (traditional X without X11 forwarding)

Server A -> 192.168.1.25 Server B -> 192.168.1.26 Both running Centos 6.6 with iptables off. No firewall in between. A$echo $DISPLAY :0.0 A$xclock -- Able to see xclock popup on the A screen ...
1
vote
0answers
5 views

Mutt using elinks to color html and external pager dilemma

These days more and more HTML emails are being unsed. Unfortunately making mutt render html in color via elinks works only partially due to the fact that the internal pager of mutt overwrites the ...
-1
votes
1answer
34 views

crontab is not working correctly while script itself calling other script

I have written a script in which I am executing some other .ksh script. When I run the script standalone its working fine however if I run the script through crontab its not working properly. Could ...
1
vote
1answer
18 views

Zipping / Encryption on Solaris 10

I have a dump file which I am zipping it up -> sending it over a network -> and burning it onto DVD. However, now i would require encryption AES 256 on the dump file. I am running Solaris 10. Is ...
1
vote
1answer
26 views

Trigger a command upon every `crontab -e` edit

We are using a shared Linux server account where as everyone comes and edits the crontab. Usually we take a backup like this crontab -l > `date +\%Y-\%m-\%d\_\%H:\%M:\%S.txt` Is there an ...
1
vote
3answers
38 views

What does “based on” and “derived from” mean in Operating Systems context? [closed]

I have been reading about *nix history and the more I read the more I get confused. I am reading terms like ... is based on ... or ... and ... derived from .... etc. A concrete ...
0
votes
1answer
20 views

Unix gzip more than one file at once

I have come to the end of my research with unix:> I'm new with unix and its enviroment, so i need your help guys. Long story short, i have a housekeeping script, which runs daily/weekly (it doesnt ...
0
votes
1answer
33 views

Using xhost, display and startx - confused

I have a client A (192.168.1.1)(vncviewer) accessing Server B (192.168.2.1) (RHEL6) to run a installer. The installation pre-requisite is to set the xhost and DISPLAY properly. Q1) Please correct me ...
0
votes
3answers
43 views

Unix grep finding file beginning with [pattern]

I would like to find files that begin with a particular pattern i.e. the first line of file should contain the pattern, and then print the first 10 lines of such file, is there a way to do that? Is ...
1
vote
1answer
21 views

fstab nouser - device still mounted

Please correct me if my understanding is wrong. The nouser option forbids an ordinary (i.e., non-root) user to mount the filesystem. This is the default. In my /etc/fstab, I have: ...
0
votes
1answer
43 views

How to mount a encrypted tar file in Linux?

Let us imagine I have encrypted my tar file with gpg as we can see here but I want to mount that with archivemount (e.g.: answer) without holding the unencrypted file on disk. Is it possible? If not, ...
0
votes
0answers
16 views

Stopping a process when a given file is accessed

I have a complex script that accesses/creates lots of files, and I'm trying to track down exactly when it creates a file with a given name. What I want is to be able to stop (e.g. as if using Ctrl+Z, ...
1
vote
4answers
50 views

what is the unix equivalent to windows command route add

I need to run the command route add -p 123.45.67.8 mask 255.255.255.0 208.00.000.000 on a linux server. what is the unix equivalent?
2
votes
1answer
55 views

Append text to first occurrence of a pattern using sed

Say there is a text file as below: Hello world types="" Mario types="Game" What I want to do is find the first occurrence of type="" and append with word "program". I need output as: Hello world ...
1
vote
1answer
23 views

How to set Permissions and Owner/Group to be used for file creation?

Legend: Owner/Group e.g. AccountUser/Nobody On a web server (apache), I have a folder (chmod 775, AccountUser/Nobody) which I move uploaded files into. A web-based script running as Nobody is used ...
0
votes
1answer
29 views

Remove last column values in field seperated file using unix shell script

The files is seperated by | pipe symbol myfile.txt Hello|how|are|you|hope|you|are|doing|fine Lilly|jasmine|rose|sunflower|nightfire|flowers I want to remove columns greater than 3. I want result ...
1
vote
1answer
32 views

Disable audio output of a program

To disable text output we use > dev/null, for example, make > /dev/null But how to similarly disable audio output? For example, skype A>&1 /dev/null or whatever. EDIT: If it's ...
3
votes
1answer
34 views

Can't run default shell

What to do if I uninstalled my default shell (/opt/local/bin/bash)? I can't open terminal under my account unless my default shell is valid or at least exists. Are there any elegant ways to fix it? ...
0
votes
0answers
40 views

In Unix, delete a file listed in the directory but missing from the filesystem

I, like an idiot, killed my rm -rf command in the middle of it, and now there's one file remaining, but it keeps saying access is denied. I assumed it was because a process was accessing it, but when ...
1
vote
1answer
29 views

Why can't I use my newly created user with chown?

So I am attempting to create a new user and group, and then change ownership of a directory to that new user/group. However, when I do, chown comes back with an "illegal user name" message. Here's a ...
0
votes
1answer
39 views

How can I remove a file whose filename has weird characters? [duplicate]

[root@host dir1]# ls -lrt total 412 -rw-r--r-- 1 root root 13747 Jun 3 16:01 -lang?[5~?[5~?[5~?[5~?:q! We tried different ways and they don't work. [root@host dir1]# ls -lrt | tail -1 | awk ...
1
vote
0answers
24 views

Can't login on server using ssh [Too many authentication failures]

I'm not able to login in the server. I keep getting this error: Received disconnect from 128.238.182.77: 2: Too many authentication failures for bmpasini It happened to me before and I solved by ...
1
vote
1answer
36 views

Generating SSH and GnuPG keys on a remote server. Key management best practices

I'm asking about best practices relating to key generation, use, and management. On a few occasions, and for various reasons, I've created SSH and GnuPG keys while logged in over SSH to a remote ...
0
votes
2answers
36 views

In Linux, how can I run a process that I can come back to later to give a command after detaching

I'm currently developing a server hosting app (mainly for myself / learning purposes) and everything works great and what not, I don't know how many of you are familiar with Counter-Strike in general, ...
1
vote
0answers
16 views

at sends a BCC to an address that doesn't exist

I'm running some pretty long tasks at work and I want to be warned when they finish, wherever I am, so I use at -m with sSMTP to get a notification on my Gmail address. It's my first time playing ...
1
vote
3answers
54 views

Check if any two files in a directory are identical?

I'm working on OSX and I have multiple CSV files in a directory. I want to check if any two of them are identical. I've tried: cmp file1.csv file2.csv || echo "files are different" This tells me ...
0
votes
0answers
15 views

more recent build of GNU coreutils for win32?

Is there a more recent build of unxutils.zip? (The unix command-line utilities for Windows) The canonical downloads are at http://unxutils.sourceforge.net/ but they date from 1999-2003; in particular ...
-2
votes
0answers
16 views

Unable to Concat Two String

This is my Script HOST='xx.xx' USER='' PASSWD='' ddate= date '+%Y%m%d' print $ddate fileName= $(STON_$ddate) print $fileName ftp -n $HOST <<END_SCRIPT quote USER $USER quote PASS $PASSWD ...
0
votes
1answer
30 views

Find UID of user via SAMBA [closed]

Is there a way to retrieve the UID of a user via a SAMBA share? I can get the user list with: rpcclient -W 'WORKGROUP' -c querydispinfo -U''%'' '192.168.21.129' 2>&1 index: 0xa RID: 0x4c0 ...
0
votes
0answers
22 views

x11 forwarding from windows to unix

i am trying to launch some GUI to a UNIX server from my win7 laptop. I have installed XMing Server (as also its fonts and XLaunch) and i am using a putty in order to launch an SSH session from my ...
0
votes
1answer
36 views

Matching () with a Unix/Linux regex

I have a couple files with the name (a).1 (a).2 ... (a).100 Since a lot of processing tools don't really like ( and ) in the filename I thought it best to rename them to a different name. I googled ...
2
votes
1answer
129 views

Why can't “sudo cp” find the files?

Who can give me a logical explanation to this issue: I can not run this command: sudo cp /data/*20150522* /backup/ cp: cannot stat `/data/*20150522*': No such file or directory And when i switch ...
2
votes
1answer
58 views

AIX - how to change user shell to bash?

I want to know how I can run bash automatically when I log into my AIX server. How can I do that without having to type bash every time I log into my AIX server?