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

3
votes
1answer
3k views

Need to copy a file from unix box to windows folder using pscp command

I have a unix svr A: username: uname password: pwd then there are some files under /usr/local/jboss/configuration which are accessible only when a 'sudo su' command is performed. (and the username ...
16
votes
7answers
21k views

Find and delete all the directories named “test” in linux

I have many directories named "test" and I would like to remove them. I know how to find them and print them using: find . -name test -print Now, how to do I remove the directories? Please note ...
0
votes
1answer
17 views

date keep showing wrongly everytime after reboot

[root@sjoam2 ~]# date Fri Jul 31 04:04:18 SGT 2015 [root@sjoam2 ~]# hwlock -bash: hwlock: command not found [root@sjoam2 ~]# hwclock Fri 31 Jul 2015 04:04:27 AM SGT -0.797288 seconds [root@sjoam2 ...
1
vote
2answers
30 views

What's the fatest way to calculate in command line?

Is there a faster way to calculate in command line the following: echo "4 * 5" | bc
0
votes
0answers
17 views

Cannot access server via SSH in terminal

When I try logging in via ssh root@server.org I am asked for my password, however when I enter it, it doesn't work. I can access the server by a different user then run su root and the password works ...
2
votes
3answers
522 views

(Probably) trivial question about rmdir

I hope this isn't too trivial, but for some reason I can't get a simple command to execute. I'm writing a file manipulation script and I have several directories called test, test2, etc each ...
2
votes
2answers
183 views

Why does cat not use options the way I expect UNIX programs to use switches?

I have been a UNIX user for more years than I care to think about, and in that time I have been trained to expect that when contradictory switches are given to a program the last one wins. Recently I ...
1
vote
0answers
42 views

Arch Linux Boot Halts on “Started Authorization Manager.”

I was using Arch Linux on my laptop, and during the shutdown procedures there was something making it wait and during that time my laptop ran out of batteries. Now when I try to boot it halts. This ...
7
votes
13answers
3k views

Is there a Unix-y tool for taking notes on the command line?

I'm looking for something really quick and simple: type note <title>, start writing, and exit. Ideally with a simple list to jump to a specific note. Is there such a thing?
0
votes
0answers
21 views

How can I put a subdirectory of /home in a different partition?

If I have /home in one partition, is it possible to put /home/username onto a different partition, or do they have to be on the same partition?
0
votes
1answer
24 views

bash - processing output one line at a time

I read that xargs was good for processing the output of a command one line at a time (and it is). I have the following line in my script. ./gen-data | awk '{printf $2 " "; printf $1=$2=$3=""; gsub (" ...
0
votes
0answers
9 views

set fileformat=unix permanantly

When I built WSO2 product pack from terminal using maven clean install and going to run from terminal by issuing below command at product home directory ./bin/wso2server.sh I got below error ...
4
votes
1answer
18k views

How to change user in WinSCP?

I'm using WinSCP to access Unix computers. How can I change user after I have logged into a Unix server using WinSCP? E.g. I have personal account in Unix computer A. I can log into this computer ...
2
votes
3answers
833 views

Redirecting shell command outputs to another konsole shell

I am writing a shell script and I would like to write commands in the script but redirect the output to other konsole sessions. (using kde)
0
votes
1answer
53 views

Running script according to Terminal Context

Is is possible to get the current context, or front-most user-facing process, to trigger a script when it changes? For instance, the user starts with the command prompt, then goes into Emacs ...
0
votes
0answers
10 views

How can login to other TRU64 from Linux?

i want to connect to a TRU64 machine from Linux system same as: "login a client to a windows network how can login from all machine from on that network" now i can connect to a TRU64 machine ...
0
votes
1answer
42 views

Multiple Conditions in shell script

Im stuck in giving two conditions in my script. I can read two things - What is the NEAREST SERVER If it is MacBook or Anything Else and then use defaults write command to modify the plist file. ...
0
votes
0answers
25 views

Using homebrew how can I install multiple versions of the same software?

I'm using OSX and homebrew. I need two versions of the same software. In my case I'd like to install vim that's built with the flag --without-python --with-python3, and vim built without those flags. ...
-4
votes
2answers
417 views

How can we display hidden files without using ls command?

Is there another way to display hidden files in the current directory without the using the ls -a command?
72
votes
9answers
192k views

ls-command: how to display the file size in megabytes?

In Unix (Tru64), how do I make the ls command show the file size in megabytes? Currently I am able to show it in bytes using the following: ls -la
111
votes
8answers
91k views

How to copy with cp to include hidden files and hidden directories and their contents?

How can I make cp -r copy absolutely all of the files and directories in a directory Requirements: Include hidden files and hidden directories. Be one single command with an flag to include the ...
138
votes
7answers
191k views

How to get the summarized sizes of folders and their subfolders?

Let's say I want to get the size of each folder of a linux file system. When I use ls -la I don't really get the summarized size of the folders. If I use df I get the size of each mounted file system ...
3
votes
1answer
246 views

When piped with ls, grep in solaris is not working

I am using the below command in solaris ls -l | grep '*PROC*' But it is not working. I have many files that contain "PROC" in their name like "XREF_PROC.complete" but when I use the above command ...
0
votes
0answers
22 views

Remotely shutdown Windows machine from Unix?

I have a Windows 8.1 machine in LAN. I discovered winexe package through my research but no attempts have been successful yet. I tried: winexe -U [windows-live-email-adress]%[pass] //[local-ip] ...
1
vote
1answer
6 views

Linux unattached chroot or directory?

Would it be possible to chroot or otherwise create an unlinked(in the main root file system) directory? From what I understand, the kernel automatically deletes any file/folder that has no link in the ...
1
vote
1answer
21 views

Why does sl have different speed in different environments?

Perhaps this may seem a silly question, because the utility sl is a rightful member of each page containing the words Linux and fun. I was wondering why does sl on my Debian in ssh session work two ...
0
votes
2answers
20 views

Trunc xml file using unix shell script

I need to select particular set of tags which contains a particular value inside the tag. For example, below is the source.XML file <main tag> <subTag1>1298</subTag1> ...
0
votes
1answer
3k views

ksh Auto-Completion PuTTY Configuration

I'm having a bit of a problem configuring my PuTTY client to work with the auto-completion feature in the ksh shell. I do a listing on the root with the directories /home and /homeroot and it returns ...
2
votes
1answer
22 views

What does this vim cmd mean? :%y+

I found a command to select all text in Vi/Vim file. :%y+ Could someone explain the line, please?
0
votes
2answers
43 views

How to tell what are my startup files for sh or bash?

From this question I understand that depending on the operating system sh and bash behave differently. Doing env and alias I can tell that: Every time I open a OSX Terminal or run bash the variable ...
10
votes
3answers
5k views

Is it possible to mount a .tar file?

The only result of any import when I searched for this was from 2001. In the intervening decade, have any tools/methods for mounting a tar file as a filesystem (perhaps utilizing fuse) been created? ...
-2
votes
1answer
24 views

Concerning terminal pagers

more < doc.txt I understand that the above command will display the contents of the doc.txt file until it fills up the screen. I can, then, go down one line at a time with the arrow keys or keep ...
24
votes
4answers
15k views
8
votes
5answers
26k views

How do I password protect a .tgz file with tar in Unix?

I'm using the Unix tar command as follows to tar up a directory and its files: tar cvzf fileToTar.tgz directoryToTar Is there a way to password protect the .tgz file? I've created ...
8
votes
2answers
2k views

What prevents rm /dev/null?

What is the mechanism by which rm /dev/null is prevented? Specifically on FreeBSD, but I'm just as interested in all other Unix based systems.
1
vote
2answers
50 views

Concatenate multiple tar files in one command

I receive anywhere from 4 to 100 very large tar (~20GB) archive files everyday. I have been concatenating them in the past by looping through each of the archives I see on the file system and doing ...
0
votes
1answer
30 views

How to upload all the files from local to host using Curl?

i have written a shell script to upload all files with different names in the specific path from local to host, but i have facing some issue and the files are not getting uploaded #!/bin/sh for file ...
0
votes
1answer
47 views

How To Make A Sparse File On Android With Terminal

I'm trying to make a sparse file on android. For this I'm using Android Terminal Emulator. I have installed Busybox so I can use the dd command. Other commands like truncate aren't installed. My ...
9
votes
5answers
12k views

How to move only files in Unix

How can I move only the plain files (not the directories) from one folder in Linux to another folder using the mv command? I have tried mv * ~/, but it copied everything including the directories.
3
votes
4answers
4k views

Single unix command to correctly transfer a large file?

I am trying to transfer a large (~3GB) file between two unix machines. I can use scp or rsync, but sometimes the transfer is corrupted. (I have to check manually.) I can split the file into pieces ...
4
votes
3answers
16k views

What does ~ mean in a Linux shell?

I'm new to Linux and have been seeing this often. Could someone explain the concept here? ~/.somefilename What does the ~ (tilde) signify?
0
votes
0answers
10 views

I have to choose between 2 ADSLs. Any OSX or unix script to massive compare and average ping, bandwidth, accross countries?

My landlord gave me 2 wifi networks to choose from. I have 3 days to decide. I would like to identify the best of the 2 provider. I already noticed 1 has 8Mb bandwidth while the other has about 28Mb. ...
55
votes
12answers
71k 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): ...
0
votes
1answer
19 views

Find all '.c' and '.h' file in directory except in 'test' directories in Linux

I want to find all the .c and .h files in my directory, excluding the ones in the 'test' folders (there are multiple). The directory I'm searching has test directories such as: ...
15
votes
4answers
26k views

How to copy a file in unix without altering its last modified time?

If I copy some file from some place to another using cp, the timestamp on the copied file is set to the time of the copy. Is there some way to avoid this? I need to copy files without altering their ...
0
votes
1answer
64 views

Is the need for a text editor in an OS for humans or the system? [closed]

From Wikipedia: Text editors are provided with operating systems and software development packages, and can be used to change configuration files, documentation files and programming language ...
1
vote
1answer
12 views

Empty swapfile after using dd

According to many tutorials available on the internet (like for example this one https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04 ), to generate a swapfile, i need to ...
0
votes
1answer
41 views

Change line endings and encoding of file at the same time

I have some files with Windows line endings and latin-1 encoding that I need to convert to unix line endings and utf-8. Of course I can for file in ./*.csv; do sed s'/^M//' "$file" > ...
0
votes
1answer
17 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
1answer
23 views

Python sources on an http site, or in ISO image?

I installed SCO UnixWare 7.1.4 on VirtualBox. This installation does not include Python. I want to download the Python 2.7/2.6 source tar-ball from ftp.python.org. however: Anonymous FTP is not ...