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

learn more… | top users | synonyms (1)

0
votes
1answer
24 views

Sort words from n rows

i need to print all the unique words and their occurences from first n rows in a give file. I have to sorted by their number of occurences and then alphabetically.(the only separator is " ") ex: for ...
0
votes
0answers
32 views

mount directory cannot be seen from within apps

I have successfully mounted a local network location on my Android device to /sdcard/routersd with permission set drwxrwxrwx; I can successfully browse within this mounted directory and do copy/delete ...
0
votes
2answers
41 views

Sort words in file

i've got some problems i'm not capable to overcome. I need to count the first let's say N words in a txt file. Then , i have to print them in decresing order, followed by the number of occurences.The ...
0
votes
2answers
29 views

Insert path in file

I have the a file.dat and would like to insert the path of this file as first line. Can anyone help me with this please ? Thanks in advance
2
votes
4answers
95 views

Moving and renaming hundreds of .jpg files, all named 5003.jpg

So here's the deal, my girlfriend wants me to transfer all of her photos off from her iPhone onto her laptop (on which we are running Ubuntu 14.04). All of the dedicated programs I tried to do this ...
4
votes
1answer
43 views

Prevent processing file until SCP transfer is finished

Large files are transferred to a server for processing. The server monitors a specific directory using incrond and when a new file is received the processing script is executed for that file. Because ...
0
votes
0answers
22 views

Incorrect file creation/modification time

So I run a backup script on a home server running Fedora 23. I also run a prune script that removes files older than 30 days. This fresh backup file keeps getting deleted because it's creation or ...
3
votes
0answers
47 views

Reason for security software to not scan directories with more than 10,000 resources in them?

We have a security software on Linux which scans for exploits in files that exist in directories on the server (such as if websites had hack scripts uploaded to them). It defaults to a limit of ...
4
votes
2answers
346 views

Is there an inode for a directory?

Each file has an inode. Is there an inode for every directory ? If not, how does Linux manage directories.
1
vote
1answer
26 views

How to convert file from one format to another with file attributes?

I have an audio file named with attributes: BreakingNews.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz I wanted to convert it to in below format: BreakingNews.wav: ...
2
votes
2answers
69 views

How do I rename files using the directory name?

My file structure now is: Input 1 pre.nii 2 pre.nii I would like it to be: Input 1_pre.nii 2_pre.nii From the Input folder, I tried: for i in */pre.nii; do echo $i_pre.nii; done ...
1
vote
3answers
52 views

Add extension to a list of files

I am trying to determine a perl method to add an extension to a list of files. I can already rename a list of files with a certain extension to some other extension, but I need to be able to do this ...
0
votes
1answer
67 views

Strange directories in /home

There are some strange directories appearing in /home (so far, maybe in other locations too). These directories do not show up in ls but do with bash's tab autocomplete, when doing things like cd. ...
1
vote
3answers
54 views

Duplicate file, replace character, then concatenate

I have a file that looks like this: i36aasf5i7538i123 i47982i16537i1256 i1647i6458i3457 i1856i8456i43865 I want to make a copy of the file, in which the first i in every line is replaced by an o. I ...
1
vote
2answers
38 views

Script to Organize Desktop into Folders/Directories by Extension

I'd like to organize desktops by running a script that places all of your files into folders by extension. I found some code through googling and the code I found creates a folder with the name of the ...
0
votes
4answers
79 views

Flattening complex folder structures with duplicate file names

I have a folder with a complicated folder structure: ├── folder1 │ ├── 0001.jpg │ └── 0002.jpg ├── folder2 │ ├── 0001.jpg │ └── 0002.jpg ├── folder3 │ └── folder4 │ ├── 0001.jpg │ ...
0
votes
0answers
52 views

Flattening folder structure with duplicate file names [closed]

I have a folder with a complicated folder structure: ├── folder1 │ ├── 0001.jpg │ └── 0002.jpg ├── folder2 │ ├── 0001.jpg │ └── 0002.jpg ├── folder3 │ └── folder4 │ ├── 0001.jpg │ ...
1
vote
3answers
53 views

Find Directory if Number of files is over X

Am wondering if someone can advise on the best way to do this. In my Web Dir is around 100 folders; each folder is a clientID. Within each ClientID folder is a Sub-Set of folders. In each subset ...
1
vote
0answers
33 views

Bulk move files back to where they came from

What happened I'm in quite a mess right now after having clamscan scan over my windows part of the system and move all found files (which apparently includes PUA's) to a directory on another drive. ...
0
votes
1answer
26 views

Exact structure of a file [duplicate]

My question may seem really basic but I struggled to find satisfactory answer. I have started to wonder what is the exact structure of a file in Linux. There are some commands like file or ls that can ...
2
votes
3answers
74 views

merge two image folders

I have two image folders on my desktop both with around 600 images each. Both folders have some duplicate images and some images with the same file name. How do I merge both together - I do not mind ...
3
votes
4answers
469 views

Copy All Files With Certain Length File Name

In directory /source I'd like to copy all files with a file name more than 15 characters to directory /dest. Is there a UNIX command to do this? EDIT: Although this question explains how to search ...
1
vote
1answer
39 views

Find oldest directory name on a remote server?

I'm writing a backup script of sorts. My backup server contains 3 directories (named by date in the MM-DD-YYYY format) For example: 12-22-2015 12-28-2015 12-29-2015 Im writing my backup script ...
1
vote
3answers
47 views

remove files based upon diff of two text files

I have created two .txt files that look like: 5fba026dcf271c6fa174b9fc2fc1fefadf1370f9 ./.changeFiles/change/addImage1.change bb352fba5807f4d03ea11abb00e411b00ce38673 ...
0
votes
0answers
26 views

Kali Linux 2.0 File language

does someone know how to change folder names (Documents, Templates, Desktop etc.) I installed it in Croatian and change the language into English (US). Everything works and is translated except for ...
5
votes
5answers
267 views

Rename files based on their parent directory using find/xargs command?

I have a directory structure like this: Project/ | +--Part1/ | | | +--audio.mp3 | +--Part2/ | | | +--audio.mp3 | +--Part3/ | | | +--audio.mp3 ... I want to ...
1
vote
1answer
45 views

Use sed to retrieve variable from 1 file and place it in another

I need to use sed to retrieve a variable form within a file name. I am updating a previous code: cat /directory/filename1.xml | sed -e "s/XYZABC/${c}/g" > /directory/filename2.xml The value for ${c} ...
0
votes
0answers
9 views

Non writable folder even for root on linux [duplicate]

is there any folder on linux that are non writable even for root user? Thanks
3
votes
1answer
227 views

better way to overwrite?

We are currently doing classic planA. I want to know which one is better? Both fileA and fileB exist, with size of ~50-100M. assume in the same NFS mount in Linux/mac assume this is a overwrite ...
1
vote
3answers
61 views

Renaming thousand files with similar names

I'm having a difficulty creating a bash script to rename my files,so i'm asking for help. The files are in the same folder and all look something like this 1xxx_(bunch of characters)=(bunch of ...
0
votes
0answers
7 views

How to tweak the Double Commander drives list?

Double Commander can display a drives list panel above the panels, additionally a drives drop-down list can be opened by pressing the button below it. I would like to hide some items from and add some ...
0
votes
0answers
14 views

How to configure Double Commander to ask for my password and use sudo when it needs it?

As a Total Commander lover I am trying to replace it with Double Commander as Midnight Commander doesn't feel enough to me (needless to say standard single-pane file managers don't). One of the ...
0
votes
1answer
43 views

Help testing special file in `/sys/class/net/`

Background I am managing a cellular interface. I have a bash script that is testing the interface. In question is the file located at /sys/class/net/wwan1/carrier where wwan1 is an unconfigured ...
0
votes
3answers
32 views

Is there a way to know which files are being created, read or updated by running app? [duplicate]

I would like to list all files that have been read, created or updated from the app running.
1
vote
1answer
15 views

Terminal based Norton Commander program

I am looking for a terminal-based file manager like the good old Norton Commander or Total Commander...but all I have found so far are graphical and hence don't run in terminal. Is there any?
0
votes
0answers
46 views

Google Drive HTTP Error when downloading .zip file with Firefox

I'm using openSUSE 42.1 and opened a fresh install of Firefox, but somehow when I try to download a zip file from my Google Drive, an error is shown: Could not download "[filename]". HTTP error. ...
0
votes
0answers
20 views

Tips for parsing proprietary file formats?

So I got a quarkxpress file. The problem is, it confidential, so I can't upload here. In general, given some proprietary file format, what steps can you take to recover data from it in linux? I have ...
6
votes
3answers
253 views

Flatten the output of a recursive directory listing

Is there a way to list out all the files within a directory tree in a single list, sorted by modification time on Linux? ls -Rlt lists out files recursively, but they are grouped under different ...
4
votes
2answers
52 views

Invert matching lines, NUL-separated

I’m writing something that deals with file matches, and I need an inversion operation. I have a list of files (e.g. from find . -type f -print0 | sort -z >lst), and a list of matches (e.g. from ...
1
vote
1answer
28 views

Restore file permissions after Windows copy

I lost my drive with my media center on it, and I realized that I had an old backup lying around. But when I went to restore my backup, I realized that all of the files had been copied with a Windows ...
10
votes
8answers
302 views

sed in-place line deletion on full filesystem?

Due to an application bug as yet undiagnosed, I have several hundred servers with a full disk. There is one file that has been filled up with duplicate lines—not a log file, but a user environment ...
1
vote
1answer
25 views

Evenly allocate resources over multiple desinations

I'm not quite familiar enough with bash to figure this out properly, I'll try to be brief with what I'm trying to figure out! I have many paths stored in a file, along with their size (in G), such ...
1
vote
2answers
49 views

list size of folders and their changed date

How can I list the size of folders as well as their changed date? I am able to get the size of folders using du. I am also able to list the folders together with their date using $ls -ltr $path | ...
2
votes
3answers
30 views

Find files with group permissions more restrictive than owner permissions

This is an actual work-related problem. Users could previously "su - userx" and was able to execute a script with user:owner permissions as userx:groupz 760 or 540, or modify a file that's ...
3
votes
1answer
311 views

I want to list all the files in my Linux server which are older than Dec 31, 2014

I want to list all the Linux files in a directory and sub directories which are older than 31 Dec 2014. Please help me out for this.
5
votes
6answers
283 views

Find files older than X days and output them by their size

I am trying to get the files older than a number of days and list them in descending order based on their size with all their information (size, full path etc - something similar that is provided by ...
1
vote
1answer
16 views

Rename files to insert _ between StudlyCapsified words

I've a music lib where files names are like 05WithoutWallsSpanishMixChillDeLucia.mp3 (no space between words BUT exist a capital letter at beginning of every word). How do I detect this string form ...
1
vote
2answers
53 views

How to fetch file with highest version number

abc_efg_2015_hanshake_01.csv.gz abc_efg_2015_hanshake_02.csv.gz abc_efg_2015_hanshake_03.csv.gz how to fetch file with highest version number and store it in a array.
1
vote
1answer
25 views

How to navigate in dialog's file and directory selectors?

I wrote some shell scripts using dialog prompting the user for directories and files. However, I don't know how to change the directory. When I press Space in a dselect, the directory gets added to ...
0
votes
2answers
43 views

Replace numbers in file1 with corresponding line in file2

I have a file that looks like this File 1 3 123456789 3 00000 2 123456789 2 abcde 1 4 abcdefgh The lines in the first column correlate with the line number of another ...