1
vote
1answer
111 views

What Causes Maintenance Shell Segmentation Fault?

I'm running Ubuntu 14.04 Trusty Tahr in a Microsoft Hyper-V virtual machine on Windows Server 2012 R2. I've stopped the VM, replaced an EXT4-formatted virtual disk volume (/dev/sdb) with a new ...
2
votes
1answer
39 views

Ignore file changes

I have a process, which generates a file with configuration data and then calls a subprocess with this data as parameter. I'd like to override the configuration data, which is passed. The problem is, ...
6
votes
5answers
834 views

How does one find out how many bits a file has in one command?

I know I can use ls -lat to find out how many bytes has a file and then multiply by 8 to find out how many bits. But is this possible in only one command line?
4
votes
3answers
101 views

Transactional UNIX shell for file system changes

It is easy to make a mistake when copying (cp), moving/renaming (mv), removing (rm/rmdir), creating dirs (mkdir), and changing file permissions (chmod). It would be nice to have a log to view before ...
6
votes
3answers
395 views

How to get mount point of filesystem containing given file

I am looking for a quick way to find the mount point of the file system containing a given FILE. Is there anything simpler or more direct than my solution below? df -h FILE |tail -1 | awk -F% ...
1
vote
1answer
97 views

Access time is not being updated when i run ` ls a ` and then ` stat a`

On CentOS Linux desktop let's create a folder named a. mkdir a Then let's access it ls a and then let's get it's statistics stat a File: `a' Size: 4096 Blocks: 8 IO Block: ...
6
votes
1answer
2k views

dd: writing '/dev/null': No space left on device

I am reading a 550MB file into /dev/null and I am getting dd: writing '/dev/null': No space left on device I was surprised. I thought /dev/null is a black hole where you can send as much as you ...
3
votes
3answers
15k views

How can I delete all files with a particular extension in a particular folder?

If I set the current/working directory (navigating to it using cd) to some particular directory and then type: rm *.xvg What will this command do? Is it true that the above command will only delete ...
12
votes
4answers
1k views

Best method to collect a random sample from a collection of files

Suppose there is a directory holding 300 data files. I want to randomly select 200 of those files and move them into another directory. Is there a way to do that under Unix/Linux?
2
votes
1answer
824 views

skype not found on Oneiric 64, but it is right there [duplicate]

Possible Duplicate: Can't execute some binaries in chroot environment (zsh: Not found) I have something weird here. Cannot find a file although it is right there. $ skype command not ...
14
votes
5answers
22k views

Script to monitor folder for new files?

How do I detect new files in a folder with a bash script? I would like to process the files as soon as they are created in the folder. Is this possible to do so or do I have to schedule a script with ...
2
votes
0answers
96 views

“cd //” and “cd /” what is the difference? [duplicate]

Possible Duplicate: unix, difference between path starting with '/' and '//' If I make a cd // followed by a pwd I see: # cd // # pwd // why is that? what's the differece ...
33
votes
2answers
1k views

Why is '.' a hard link in Unix?

I've seen many explanations for why the link count for an empty directory in Unix based OSes is 2 instead of 1. They all say that it's because of the '.' directory, which every directory has pointing ...
5
votes
2answers
2k views

/dev/sda2 has gone 49710 days without being checked, check forced

Why the shell show "/dev/sda2 has gone 49710 days without being checked, check forced." at centos start and then reboot? ...... /dev/sda2: Superblock last mount time is in the future. FIXED. ...
1
vote
3answers
388 views

Fast incremental searching of files from shell

I like the command-t script in vim editor that is able to intelligently and incrementally search for files. Is there some similar program that is able to search from shell? It would be great if it ...
9
votes
2answers
748 views

How to manage huge amount of files in shell?

$ ls ./dir_with_huge_amount_of_files/errors/ Suppose a directory is full of pictures with unix timestamps, I mean a lot measured in many GBs or even more. Shell-commands like ls will get ...
1
vote
1answer
340 views

error using “du” command

I am on the university machine trying to estimate the disk usage I have on my space I do du -csh ./ from the begining of my account, but an error is given that ./Yesterday/Yesterday is not a ...