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

4
votes
4answers
12k views

pkg.tar.xz file - how to unpack on a Unix or Windows system?

I am a newbie Unix user. I have a file whose extension is pkg.tar.xz. How can I unpack this file on Windows or Unix? I can use Cygwin but I'm not sure which utility I'd need to use. Any ideas?
1
vote
2answers
158 views

How to download files from command line?

For example, see this page Advanced Linux Programming. I want to download all the pdf files linked from this page. Is there a simple commandline way of doing it? Something on the lines of download ...
0
votes
1answer
70 views

The OSX Process that wont die

I've got a process on OSX 10.9.5 that just wont die. I have tried kill PID kill -9 PID sudo kill -9 PID killall sshfs killall -9 sshfs sudo killall -9 sshfs Activity monitor / select process / ...
19
votes
3answers
12k views
12
votes
3answers
25k views

Copy list of files

I have a list of files separated by spaces in a file list.txt. I'd like to copy them to a new folder. I tried to do: cp `cat list.txt` new_folder but it did not work. How would you do this ? ...
1
vote
1answer
201 views

How to justify and center text in bash?

Newbie here. I'm looking for bash script to center and justify text. My script only works with one line of text. How would you improve it? #!/bin/bash COLS=$(tput cols) while true; do clear ...
4
votes
1answer
3k views

How are directory structures stored in UNIX filesystem?

I have read that each directories store their content (files and subdirectories) by using a list of filename and inode pairs. But none of the reference I got said something about how they are stored. ...
0
votes
0answers
21 views

WAFL - Write Anywhere File Layout

Hi I'm looking for some information on how WAFL works , more specifically I need help in understanding the following parts. To make your task of answering simpler I've outlined a few questions. ...
2
votes
0answers
26 views

What are the other uses of Hard Links , Junction Points , Symbolic Links

There are many answers on why Hard Links, Junction Points & Symbolic Links are useful. I understand Junction Points are supported Vista onwards and described as Directory Hardlinks (even though ...
2
votes
1answer
25 views

What's happening when you do 'cd //'? [duplicate]

This is just trivia really, but it's just got me wondering what's going on. I accidentally hit / instead of . today and got this: [andrew.morris@server ~]$ cd // [andrew.morris@server //]$ pwd / I ...
0
votes
1answer
25 views

Delete a file inside multiple ZIP archives on the OS X command line

I'm trying to delete files with specific extensions from multiple zip archives. For example I want to delete all .html files contained in the zip archives in the current path so I have tried this: ...
1
vote
0answers
14 views

Drop privileges in Pass (unix password store tool)

Pass is a Unix command line password manager http://www.passwordstore.org/ To read any stored password one has to input the master-password, it then allows to read/write any password. However this ...
2
votes
2answers
69 views

List folders in Linux which can only be seen if accessed

Maybe it is a amateur question but here it goes: At the university we have a folder /vol. This folder is absolutely empty until you "cd" into a directory which exist there. E.g. "cd ...
2
votes
1answer
70 views

What is the difference between “elif” and “else if” in shell scripting?

I am very new to shell scripting. When I look at some code, written for ksh (#!/bin/ksh) I see there is else if as well as elif used in one script. So, what is the difference between else if and ...
0
votes
1answer
50 views

Merging two directory trees with same structure, but different contents in Unix

I have two directories with the following structure: A |_0 |_1 |_2 B |_0 |_1 |_2 each 0,1,2 directory contains unique contents. I want all of the contents to simply exist as: A |_0 |_1 |_2 Is ...
3
votes
2answers
2k views

How can I get the uncompressed size of gzip file without actually decompressing it?

Please find my OS details: $ uname -a AIX xxyy 1 6 000145364C00 I've tried the following command to get size of a file in gzip archive: $ gzip -l mycontent.DAT.Gz compressed uncompr. ratio ...
0
votes
0answers
15 views

What installs fonts on a unix-based system?

I want to understand in which operating systems (unix-based), I can assume that fonts will be installed automatically? I assume they are probably installed in conjunction with a desktop GUI such as ...
0
votes
0answers
7 views

USB Target mode multiplexer for video feeds

We have proprietary (not ours) windows software that processes video from one camera connected via USB. We would like to analyze feed from many (10+) cameras by rapidly switching video source. Usage ...
0
votes
5answers
49 views

My user information was deleted [duplicate]

Possible Duplicate: Undo an “rm -rf ~” command? So I made a stupid error, I did a sudo rm -rf of my ~/ directory. I wasn't thinking of the hidden files in there. Now instead of showing what ...
1
vote
1answer
162 views

How can I split a large file into smaller parts on Windows? [duplicate]

I want to split a large file ~9 GB by lines, I know split command in UNIX but is there a similar command for Windows?
0
votes
2answers
347 views

Hide files in unix without changing their name (adding the dot) so that scripts that use them still work [duplicate]

Short version: I want to be able to prevent certain files from appearing in the output of ls, without adding the dot, and thus changing their names. Long version: Recently, I moved a bunch of scripts ...
1
vote
0answers
30 views

Monitor disk I/O used by specific command

I know that there are various tools for monitoring disk I/O, but I am wondering specifically if there is something equivalent to time for disk usage? For example, I am benchmarking a specific command ...
1
vote
1answer
50 views

How to get tree -a to ignore .git directories?

I love using tree to list directories, and I have a git repository with all my dotfiles. For me to be able to see them I need to do tree -a, but that will also list the contents inside the .git ...
1
vote
3answers
458 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 ...
1
vote
1answer
157 views

what happens when moving hard linked file across filesystems using mv?

I have a collection of folders on one file system which have been hard linked together (the contents are identical). What happens when I move one of the folders to another filesystem on another ...
4
votes
3answers
4k views

What is the difference between Linux (Ubuntu) and Mac shell commands?

I use Ubuntu at work and a Mac at home. I was trying out some shell commands on my bash terminal on the Mac today but they didn't work. I was told both machines should operate UNIX commands so the ...
3
votes
2answers
6k views

How do I close a file that I created using cat > command?

I learning how to use git on a Mac and I'm trying to add a file in one of my branches by using the "cat > " command. The problem I'm having is that I want to end editing the file in the terminal but I ...
3
votes
3answers
85 views

How can I see how much of a file has been read by an active process?

I often have a long-running job where an application reads through a large file (>2GB) and performs processing on each record. Is there any UNIX command I can use to see how deep into the file the ...
0
votes
1answer
66 views

How to remove mac extended attributes from a file?

I have the following special attributes on my pdf file: -rw-r--r--@ 1 Barnabas staff 18227 Oct 9 11:34 myfile.pdf com.apple.metadata:kMDItemWhereFroms 331 ...
7
votes
3answers
73k views

How to change file permissions for a directory in one command

How can I change all the file permissions of a directory in one command in Unix?
15
votes
5answers
16k views

ps: How can i recursively get all child process for a given pid

How can I get the entire process tree spawned by a given process displayed as a tree and only that tree i.e. no other processes? The output could e.g. look like 4378 ? Ss 0:10 SCREEN ...
2
votes
2answers
193 views

Slicing video file into several segments

I am currently using ffmpeg to slice video files. I automated the process through a script called ffmpeg_split.sh. Although this very slow it is efficient in splitting videos into equivalent settings. ...
2
votes
1answer
133 views

Splitting video file into equivalent segments with ffmpeg

I have ffmpeg installed in my linux box. I am using it to split files into equivalent segments. So far I have test two approaches: 1. Create a bash script that grabs the file durationffprobe and then ...
4
votes
6answers
3k views

Listing everything else than *{.tex, .aux} by ls

How can you ls everything else the the files *{.tex, .aux}? I run unsuccessfully ls -I".tex"
7
votes
4answers
10k views

How to limit output of ls to only show filename, date and size?

How can I use ls in linux to get a listing of filenames date and size only? I don't need to see the other info such as owner, permission.
1
vote
1answer
26 views

Authenticate User's Unix Credentials via Web Browser

Can anyone give me tips on how to authenticate a user's Unix credentials through the browser? I am basically giving access to some file viewing and I want to make sure the users are authenticated but ...
7
votes
5answers
9k views

Stuck choosing between ext4 and ext3 for the file system

I was in the process of installing Ubuntu 11.10, but got stuck choosing which file system to use. ext3 and ext4; which is better for a personal desktop? If ext4 is better, will it work well on my ...
6
votes
5answers
702 views

Is there any functional-like unix shell?

I'm (really) newbie to functional programming (in fact only had contact with it using python) but seems to be a good approach for some list-intensive tasks in a shell environment. I'd love to do ...
-1
votes
2answers
53 views

Unix - Searching for every file with a certain string in it

I am searching for every file within a root directory and want to search every subdirectory as well. I have tried grep -r "message" * but I am not sure that this searches every subdirectory, any ...
6
votes
3answers
5k views

List all unique extensions for files contained in a directory

I would like to see all the unique extension of files contained in a certain directory. What is the command to do that in bash? One could use find . -type f to get all the files in the current ...
1
vote
1answer
189 views

What is the difference between these two grep options?

I am writing a script. What is the difference between the following two lines? grep . || echo something and grep "^\." || echo something
11
votes
2answers
2k views

Unix: Slash after directory names or not

What is the difference between the following commands? mv foo bar mv foo/ bar/ mv foo/ bar mv foo bar/ Or is there no difference? Or does it depend on the command being used? Think for example I ...
1
vote
4answers
1k views

Tool to monitor file read/write in unix

Is there any tool/command available in unix to monitor read/writes in a particular file. I also want to collect how much data is being read each time the file is accessed.
7
votes
1answer
4k views

Does rsync delete files, folders at destination by default?

Files Suppose that /foo/src contains only A.c and that /foo/dest contains both A.c and B.c. And suppose I run the following command: rsync /foo/src/ /foo/dest Will rsync erase B.c? Folders Now ...
2
votes
2answers
46 views

Grep in newest file

I'm trying to find a specific line from the newest file I have in subfolders. Files have the same name. So structure is like: Folder SubFolder1 filename.xml SubFolder2 filename.xml I'm ...
4
votes
0answers
336 views

Connection timing out when connecting to Milter service

I'm using a VPS with CentOS 5, containing Postfix and OpenDKIM. I have set up OpenDKIM using this guide. Everything seems to work properly as the log in /var/log/maillog does not report anything other ...
2
votes
2answers
46 views

In UNIX, the rm='rm -I' is not working

In the command prompt of g++ terminal, I am typing alias rm='rm -I' and it is giving me missing operand. I'm not quite sure what I should do, and yes I know naming it rm is bad. It is for an ...
7
votes
5answers
6k views

How can I compare two directories, one being a remote directory?

I want to compare two directories, one is local and the other is on another machine. How can I do that? Can I do it with diff?
5
votes
1answer
465 views

Best practice for storing custom commands (Unix)

I wish to know if there's any standard or recommended place to store your own custom commands (should you prefer not to install them in /usr/local/bin)? I'm referring to small gimmicks that I, ...
0
votes
1answer
31 views

DU reports different folder size in unix and cygwin (windows)

I was copying some files from windows machine to unix one (debian) and after checking file count (both matched) i tested folder size with du and i got different results: windows: ...