Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [file-management]

The tag has no usage guidance.

4
votes
2answers
53 views

how to speed up tar, just build a package without compression

I have a large folder, 2TB, with 1000000 files on a Linux machine. I want to build a package with tar. I do not care about the size of the tar file, so I do not need to compress the data. How can I ...
1
vote
2answers
51 views

Want to rename a files in folder with folder_1.txt folder_2.txt folder_n.txt name

I have 3 directories on my Ubuntu machine, named abc, xyz and pst. In each directory, I have approximately 7 files with different names. I want to rename each file like abc_1.txt, abc_2.txt, abc_3.txt,...
0
votes
2answers
28 views

same files from different directories

How to list and compare the similar files from different directories using single command on Linux? Let's suppose there are three files a, b and c in directory /home/test and a, d, c files in another ...
0
votes
0answers
19 views

How to send by bluetooth from Caja / Nautilus file manager?

Would it be possible to add a menu item under caja-actions to send a file via bluetooth? Or could it be created under "open with"?
1
vote
1answer
74 views

How to rename files with sequential names to an another sequence using Terminal?

I have a directory that has files in it that are named 'o1.ray' to 'o293.ray'. I want to move them to an another directory while renaming them 'o132.ray' to 'o424.ray'. How can I do this in the ...
0
votes
1answer
12 views

File popups freeze in specific directory and show nothing - how to fix?

I had this issue for months. Whenever I moved to my home directory within a file popup (from both qt and gtk), the window freezed and I could neither close it nor move to another directory. I just had ...
3
votes
1answer
137 views

Move command to transfer all files in a subfolder to parent directory and rename if there are files with same name

So I have a directory that has 77 subfolders in it on my Ubuntu machine, each with various amounts of torrent files in them. Total of 427 torrents are contained in the subfolders. I want to move all ...
3
votes
4answers
1k views

How to move files specified in a text file to another directory on BASH? [duplicate]

I have a directory with over 400 images. Most of them are corrupt. I identified the good ones. They are listed in a text file (there're 100+ of them). How can I move them all at once to another ...
5
votes
1answer
6k views

How can I sync two local directories? [duplicate]

I have two backup directories (dir1 and 2) on two different (local) HDDs and I want to create one of them. How can I really sync their contents so that both directories will have the same contents?
3
votes
2answers
919 views

How can I sync the most recent files from one folder to another?

I have several cameras that upload data to a Samba server running under Debian. The video files are initially uploaded to a larger external drive, but I would also like to maintain a copy of the ...
0
votes
3answers
212 views

How to move everything but the last files?

How can I move everything but the last n files, from dir1 to dir2?. I currently do this, setting the time as an approximate for n, in my case n=2 each 10 minutes. find /dir1/ -name '*.txt*' -mmin +...
1
vote
0answers
43 views

How to link the subdirectories only with maximum digit folder using linux command?

I have the following directory structure and I need to remove the minimum linked directories and keep the maximum one using the command line. How can I do it? My directory structure: prj38 |-...
3
votes
3answers
963 views

ls option to list files without reference to extension? [closed]

We use a numeric version control for files (ex: report01.log.01, report01.log.02, report01.log.03, etc.) What I need to do is produce a list each file and the number of versions the file has. Does ...
-5
votes
2answers
570 views

How to get Linux to display hidden files beginning with b?

I am currently taking a Controlled Assessment in a Computing GCSE and this is the task. At the command prompt, type ls -a. Demonstrate and explain what happens. Modify this command so that it ...
2
votes
1answer
98 views

Free space does not increase even after deleting

I had about 170 MiB free space in my Raspberry Pi so I decided to delete the .deb packages (about 800 MiB) in /var/cache/apt. I opened sudo pcmanfm, selected the files and pressed the delete button (...
0
votes
1answer
146 views

Delete files if number exceeds 30 in number for different files in same directory [duplicate]

The folder gets populated some jobs that run daily, weekly or monthly. For eg. daily job outputs be like: daily-2017-16-08.txt daily-2017-15-08.txt Weekly be like: weekly-2017-01-08.txt weekly-...
4
votes
1answer
1k views

Document Management System for Linux

So I got a problem and I hope someone knows the answer. Basically I am looking for a DMS (document management system) for my music and movies. I have a huge amount of files, currently in folders but ...
7
votes
4answers
16k views

How to sort files by part of the filename?

Given the files below: ABC38388.SC01.StatueGrade_MKP ABC38388.SC02.Statue_GKP DEF38389.SC03.Statue_HKP XYZ38390.SC00.Statue_WKP How can I list them all based on the SC value, like this: XYZ38390....
1
vote
1answer
45 views

Scan though directory of files and find replicates with same name and concatenate them into one file

I have a directory with a bunch of files For example: ExperimentA_Rep1.bed ExperimentA_Rep2.bed ExperimentA_Rep3.bed ExperimentB_Rep1.bed ExperimentD_Rep1.bed ExperimentC_Rep1.bed ...
3
votes
2answers
981 views

How can I remove files which contain special characters and Latin-1 characters?

I have 2 files in a directory named App on my Ubuntu mahcine. I want to remove those 2 files completely from that directory, but when I try to remove them using rm -rf, they are not deleted. I can't ...
4
votes
3answers
612 views

Move unique files from a folder with duplicates files

Well to put it simply, I have duplicate files in a folder, with this form: file.ext file(1).ext file(2).ext file(3).ext otherfile.ext otherfile(1).ext otherfile(2).ext ... I want to move only file....
7
votes
5answers
8k views

How to delete files from a folder which have more than 60 files in unix?

I want to put a script in cronjob which will run in a particular time and if the file count is more than 60, it will delete oldest files from that folder. Last In First Out. I have tried, #!/bin/...
-2
votes
1answer
45 views

Copying all same files to one location and changing the file name to subdirectory_filename

I have conf.yml files in different folders as below. /var/loyalty-badge/conf/conf.yml /var/loyalty-level/conf/conf.yml /var/promotion/conf/conf.yml /var/featured/conf/conf.yml Now I want all the ...
7
votes
4answers
6k views

Search and Delete duplicate files with different names

I have a large music collection stored on my hard drive; and browsing through it, I found that I have a lot of duplicate files in some album directories. Usually the duplicates exist alongside the ...
5
votes
3answers
14k views

How to delete old backups based on a date in file name?

I have a daily backups named like this: yyyymmddhhmm.zip // pattern 201503200100.zip // backup from 20. 3. 2015 1:00 I'm trying to create a script that deletes all backups older than 3 days. The ...
8
votes
4answers
10k views

How to move all files inside present subfolders up here

I have 50 folders with some subfolders too, with more than 1000 audio files total. I need to remove all subfolders and put all files in present level. Tried mv */* ./ but it complaints: argument list ...
2
votes
2answers
2k views

Find unique files between two directories (recursively)

I am backing up files, and I have a lot of files duplicated in multiple locations. I've used fdupes to find duplicates, but I'm actually looking for some sort of inverse of this tool. I want to see ...
1
vote
3answers
1k views

Renaming directory bash script - target … No such file or directory

I've been testing this on a simple directory structure. I'm trying to change any directory and/or sub directory with the name "Season" to "Sn". I got to a point where the script would change what I ...
-1
votes
3answers
274 views

match just one row in two files and return the whole column from file 2

If I have two files file1: Reference Position 905894 1197693 3703749 92108275 114940633 114940633 file2: Mapping Reference Position Type Length Reference Allele Linkage Zygosity Count ...
219
votes
7answers
354k views

Remove all files/directories except for one file

I have a directory containing a large number of files. I want to delete all files except for file.txt . How do I do this? There are too many files to remove the unwanted ones individually and their ...
6
votes
2answers
2k views

Alternative command for coloured viewing the size of all files and folders

Is there a nice alternative for this? I always use du -shc * to check the size of all files and folders in the current directory. But it would be nice to have a colored and nicely formatted view (...
3
votes
3answers
167 views

Copying all files from one directory to all directories under same parent directory

I have one parent directory /home/test and under that directory I have multiple directories. The names are server{1..10} and one of them server3 has few files which I have copied from remote server. ...
2
votes
1answer
708 views

Compare two similar directories and list differences between files

Suppose I have same version of linux kernel but I changed some driver lines. Is there any way to compare these kernels and list the results. The result would be helpful to go back if I changed a lot ...
2
votes
0answers
42 views

File viewer (not manager) with dual pane

I have multiple papers, in multiple directories. let us call the papers A, B, C, D... and I have to write reports often, where I have to answer questions like Q1, Q2, Q3, Q4... Now, what often ...
2
votes
1answer
837 views

RANCID like configuration differ for linux applications

I'm looking for a RANCID-like (http://www.shrubbery.net/rancid/) config management tool - the catch is that I want to manage config files for Linux applications like mysql, apache, memcache, varnish, ...
22
votes
4answers
6k views

Disable “Recently used” in GTK file/directory selector

Can I completely disable "Recently Used" feature in GTK's file / directory selector? Sometimes programs default to this but since it's not useful in my work-flow and with the way I organize my files, ...
7
votes
4answers
5k views

How to disable trash can in Thunar/XFCE?

I found myself always holding Shift when I delete a file with Thunar (the XFCE file manager). When I was using Windows I was always disabling "recycle bin" immediately after installation. I've looked ...
4
votes
2answers
5k views

What is the difference between > and >> (especially as it relates to use with the cat program)? [duplicate]

Suppose that I have a file called temp.txt. Using the cat program, I would like to add the contents of this file to the end of myfile.txt -- creating myfile.txt if it does not exist and appending to ...
2
votes
2answers
2k views

How to copy/move/delete files from the shell?

It's surely easy to do while using a graphical environment, but when I'm using the shell I have no idea on how to do that, I already tried to use copy, move, delete, and I discovered that these word ...
3
votes
2answers
747 views

Organizing messy folder based on filetype

I have music lying on my desktop and in my downloads and Music folders. Similarly, I have .odt files lying all over my home folder (mainly desktop). Is there a tool (preferably GUI so my parents can ...
6
votes
4answers
7k views

Copy a File From One Zip to Another?

I have a file named 'sourceZip.zip' This file ('sourceZip.zip') contains two files: 'textFile.txt' 'binFile.bin' I also have a file named 'targetZip.zip' This file ('targetZip.zip') contains one ...
8
votes
4answers
13k views

Copy/rename multiple files using regular expression (shell script)

I have a collection of files matching a pattern such as 'assignment02.cc', 'assignment02.h', 'assignment02.txt', etc. I would like to copy/rename these files into 'assignment03.cc', 'assignment03.h', '...
82
votes
3answers
35k views

How do you run a dry run of rm to see what files will be deleted?

I want to see what files will be deleted when performing an rm in linux. Most commands seem to have a dry run option to show just such information, but I can't seem to find such an option for rm. Is ...
2
votes
2answers
632 views

Copy a file from a nautilus-script to clipboard

I have a nautilus script that generates an archive file based on the files selected in the nautilus window. This archive file is created in the /tmp directory. I want a way to copy this file to the ...
14
votes
5answers
3k views

How to de-unzip, de-tar -xvf — de-unarchive in a messy folder?

Usually, I unarchive things by $ mkdir newFolder; $ mv *.zip newFolder; $ cd newFolder; $unzip *.zip but sometimes I get lazy and just do in an arbitrary folder $ unzip *.zip so time-to-time messing ...
5
votes
2answers
4k views

Gentoo default application for opening files

On my Gentoo box running without a desktop environment, every time I try to open a file the system tries to open it with Firefox. I understand that without a desktop environment "open file" cannot ...