Use this tag for questions about file management and operations on files.

learn more… | top users | synonyms (1)

2
votes
2answers
67 views

Download copy of file which updates on change

Sorry about the title, I didn't know how to write it - It's kind of confusing. Ok, I am using my Raspberry Pi (Debian) and I store code on this server in which people have access to. My problem at ...
0
votes
1answer
788 views

Shell script to delete all files which are older [duplicate]

Possible Duplicate: Deleting files by age Write a shell script to delete all the files which are "n" of older that current day, where n can be 3days. 2days, or 1 year etc. The above script ...
1
vote
1answer
81 views

How do I give global access to a file in a private folder?

For example, I want all the files in /home/trusktr/Downloads/ to remain hidden from other users, except for one. I tried chmod 777 /home/trusktr/Downloads/someFile.avi but someFile.avi is still ...
1
vote
1answer
289 views

Group permissions ineffective, permission still denied

I've got a problem with UNIX permissions : I'm working under Debian Squeeze, and one of my scripts, run by www-data, needs to move a file, 23550.zip, placed in the home directory of another user, ...
2
votes
1answer
282 views

Compare all text files in a directory, and sort by similarity

In Unix, is there any way to compare every text file in a directory to every other text file in the directory, and then sort each pair of files by similarity (using the diff utility)? There are ...
1
vote
2answers
863 views

How to know recently updated files

If I run iostat -x 1 I saw ocassionally large 5MB to 10MB writes. What files are being written? I want to check the recently created files with size over 5MB for example. How would I do so?
0
votes
2answers
150 views

file command + how to view all results from file command

I use the file command in order to verify if file (PATH) is text/ascii file or encrypted file Because file command have allot of results ( small example in example 1 ) I want to get the all ...
0
votes
2answers
2k views

How to find last deleted files on OpenSuse?

I didn't lock the screen on my OpenSuse Linux and let my girlfriend do all evil things when I was sleeping. Is there a way to find out if she deleted any files from my PC? I was looking at the "Date ...
3
votes
3answers
3k views

Check whether files in a file list exist in a certain directory

The runtime arguments are as follows: $1 is the path to the file containing the list of files $2 is the path to the directory containing the files What I want to do is check that each file listed in ...
1
vote
1answer
245 views

How to set metadata for music files?

In windows music files have metadata like artist name, album name associated with them. How is this metadata stored. Is it stored in file system like other file attributes or is it part of MP3 data ...
28
votes
3answers
4k views

locate vs find: usage, pros and cons of each other

In Linux and Unix systems there are two common search commands: locate and find. What are the pros and cons of each? When one have benefits over the other?
2
votes
1answer
135 views

Find files with specific extension with help of recoll

How to make recoll program to show files with specific extension (for example, *.cpp, *.txt, etc)?
8
votes
2answers
8k views

What are character special and block special files in a unix system?

How are character special files and block special files different from regular files in a Inix-like system? Why are they called “character special” and “block special” respectively?
3
votes
1answer
2k views

how to remove quarantine from file permissions in os x

I downloaded a .pem file and my Mac OS X (10.8.2) added an @ sign at the end of the file permissions. This is causing file permission issues. I can't seem to remove the quarantine flag. I even tried ...
3
votes
5answers
402 views

Print non-existent files from a pipe input

I have a directory of lots of .PDF and .JPG files. There should be a .JPG file for each .PDF with the same name. I'm trying to use a command to find .PDF files that doesn't have a .JPG file. My ...
5
votes
2answers
2k views

How to place / store a file in memory on linux?

I have read somewhere that one can put a file on a linux system into memory, and loading it will be superfast. How do I do this? How do I verify the file is loaded from memory?
12
votes
2answers
4k views

What does the 'd' mean in ls -al results and what is that slot called?

In Linux, what does the d mean in the first position of drwxr-xr-x? And what are all of the possible letters that could be there, and what do they mean? I'm trying to learn more about the Linux file ...
5
votes
2answers
4k views

tar files from another directory without copying them

This should be very simple for experts in here. I have a Linux account with user disk quota of only 6GB. There is some data-folder in /opt with about 3GB of data with when compressed comes up 1GB. ...
2
votes
1answer
226 views

Using awk, how to get desired output from multiple file sources

I have two files: file1: A,D B,E C,F file2: G,H,I J,K,L Using awk, I want to print: A,D B,E,I C,F,L How can I use awk to achieve this?
9
votes
6answers
1k views

How to copy every 4th file in a folder

I have a lot of files in a folder, named like 00802_Bla_Aquarium_XXXXX.jpg. Now I need to copy every 4th file to a subfolder, saying in selected/. 00802_Bla_Aquarium_00020.jpg <= this one ...
16
votes
3answers
1k views

How can you trim files using the command line?

What is the console equivalent of the following Python code: target = file("disk", "w") # create a file target.seek(2*1024*1024*1024) # skip to 2 GB target.write("\0") target.close() Maybe some ...
2
votes
5answers
459 views

Replacing lines in files with file contents

I have several files which contain some PHP includes and I want to substitute them with the file contents. The file looks like foo <?php include("file1.php"); ?> bar baz <?php ...
2
votes
2answers
82 views

'tie' [nonexisting] files to programs

Recently, I just had an idea which turned out to be pretty useful under certain circumstances. But first some simple explanation: In Perl, you have the option to tie variables to some functions ...
3
votes
2answers
177 views

Unix command to find files read by specific user

I would like to find files accessed by specific user (even just read) within a folder tree. I thought the find command had this option, but it actually just searches for owner user. Is there any other ...
20
votes
1answer
868 views

How to implement a horizontal cat? [duplicate]

Standard cat concatenates files line by line (row by row, if you will). I find myself needing a horizontal cat command more and more often recently; i.e. a command that takes a list of files and ...
3
votes
1answer
114 views

How to display the permissions of a new file in the status line of the Vim editor?

With the following piece of code I get the permissions for an existing file: augroup Get_file_perm autocmd! autocmd BufWinEnter,FileChangedShell * let w:file_perm=getfperm(expand('%:p')) augroup ...
0
votes
2answers
112 views

Including a date in a filename

Inside a directory, there are 150 files named like ABLIMITS.TXT. How do I rename them to ABLIMITS_date.txt prompting the user for date?
3
votes
1answer
620 views

Samba set share browsable only for a group

How I can configure samba to set browsable a share for a group only. I wanna hide the share for all other users, if a set browsable to yes all the users can see the share when explore. I don't want ...
4
votes
1answer
890 views

Removing files that do not exist

I apologize for the possibly misleading title, but it is the best way I could think of to describe the problem, which is: I have several files that I can cat, but when I try to rm them I get a "No ...
1
vote
1answer
610 views

Trigger action each time a file is modified [duplicate]

Possible Duplicate: Can a bash script be hooked to a file? Is it possible to mount a mechanism to a file to perform an action (e.g. mark the change in some log file and such) each time the ...
2
votes
3answers
2k views

touch: cannot touch file: No such file or directory

I am getting the error: touch: cannot touch `/opt/tsrm/compliance/cme/log/20121207.log`: No such file or directory on the touch command: touch $LOGFILE I also checked the link: touch: cannot ...
0
votes
1answer
137 views

linux/solaris + manipulation of Standard Output

I run the following line on linux/solaris machine ( all output will write in to /tmp/Log from application.bin ) ./application.bin 1>>/tmp/Log We can see the content of the /tmp/Log file ...
2
votes
1answer
154 views

Why are the timestamps on files so old on my newly installed system?

I installed the Red Hat Enterprise Linux 5.6 on a client system today. If it is of any concern, it's running on the bare metal. After the installation was completed, I did ls -ltr / and it showed a ...
4
votes
4answers
1k views

How to visualize directory tree structures?

I know I can use tree to show the nested content of a directory. Alas, its output is hardly beautiful as I want to include it in a documentation. So eye-candy is a requirement. So I was wondering if ...
3
votes
1answer
645 views

Perform commands on selected items in Midnight Commander

How can I perform a command on the selected items ? for example calling vim, or gimp for the 5 text or image files selected. I tried to make use of the inlined command line at the bottom, but it ...
2
votes
2answers
393 views

Pre-defined umask under a given path [duplicate]

Possible Duplicate: How to set default file permissions for all folders/files in a directory? Say I have default umask, umask1. I would like all files/folders that I create/modify under a ...
2
votes
1answer
124 views

vim not shown in fuser

First use Vim to edit a file, say /tmp/A. Assuming that vim process is the only one that accesses /tmp/A, then use "ctrl+z" to suspend the process, and execute fuser /tmp/A Then you see nothing ...
1
vote
3answers
171 views

How to move all files plus hidden to folder down?

I want to move all my drupal files in www folder to html folder. I don't know how to do this in terminal and I'm not sure if all folder and files including hidden ones are drupal in the www folder, is ...
0
votes
1answer
512 views

Cannot execute binary file on Linux server [closed]

I'm currently trying to run Knime (a Java-based program) on a Linux server, and every time I try to execute the file (knime) it gives me a "cannot execute binary file" error. I've posted the relevant ...
5
votes
1answer
154 views

Wrong emblem used for PDFs created by LibreOffice

If I create a test pdf file in a directory, by using something like ls -al > testpdf.pdf the file is shown in Caja 1.4.0 with an understandable emblem that is 'acrobat-like'. If I create a ...
2
votes
1answer
978 views

Sphinx Search shutting down after `FATAL: accept() failed: Too many open files`

I'm running Sphinx Search Server V2.06 ( the latest stable release ) on an Amazon EC2 with Linux CentOS. In general it is running fine, but the searchd.log is showing this error over and over with ...
2
votes
1answer
59 views

remotely query text file associated with an instance of vi

I have opened several text files (a.txt, b.txt, c.txt, ...) in different sessions of vi launched from different instances of a bash shell. Having then accessed that machine remotely, I wish to ...
1
vote
1answer
80 views

Does a return from a shell command guarantee that output files have been written?

I'm building an OSX app and use the screencapture command to grab a screenshot and write it to disk: screencapture -mT0 ~/screenshot.png Can I, if I'm not running a UNIX commands in the background, ...
2
votes
2answers
403 views

Sort the output of find before piping to openssh

I'm using this command to recursively generate a SHA-512 hash for each file in a directory hierarchy: find . -type f -exec openssl sha512 {} \; I'd like to sort the files in lexicographical order ...
2
votes
1answer
351 views

How to make difference between .wxm (wxMaxima) and .c files in Linux Mint?

I installed wxMaxima on my laptop a few days ago. The issue is that files with the extension .wxm, that are used with wxMaxima, are identified as a C source files. Therefore, when I double click on ...
3
votes
2answers
305 views

Linux isn't sure whether a file exists or not [duplicate]

Possible Duplicate: Getting “Not found” message when running a 32-bit binary on a 64-bit system ts3user@...:~/ts3$ dir CHANGELOG LICENSE doc ... ts3server.pid ts3server_linux_x86 ...
3
votes
1answer
158 views

Linux Icon Naming Conventions

Is there a naming convention in Linux when it comes to application icon filenames? What I'm referring to is the practice of including the icon size in the filename if the application uses multiple ...
1
vote
1answer
597 views

Samba share file permissions - users can't open files that I create

I have set up an Ubuntu server (12.04 LTS) for samba file sharing. The problem I'm having has to do with files that I create on the server. Other users can't open them because I created them under a ...
1
vote
1answer
157 views

What does - mean with association to Linux files and directories [duplicate]

Possible Duplicate: What does “--” (double-dash) mean? What does '--' (two dashes) mean with association to Linux files and directories. I've found something else but not too sure if it is ...
1
vote
1answer
554 views

How to move files with same name and concatenate

My directory structure is given below. I need to move all the folders from Test3 to Test2 and concatenate the files with same names [jg@hpc Test2]$ tree . |-- Sample_1008 | |-- ...