Questions tagged [file-management]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1
votes
2answers
34 views

Use substrings of filename as parameters in for loop that builds aws command

I'm trying to upload all files in a directory to s3 using dates in the filenames as parameters to create the s3 locations. Here's what I have so far. for file in /home/ec2-user/clickparts/t*; do ...
0
votes
2answers
44 views

Removing a single character from the beginning of file names

File names : _10_-_Overriding_or_customizing_the_rest_end_point-rkkfgI502f0.mp4 _11_-_Expose_ids_in_json_response-CrDXtLfiZos.mp4 _12_-_Create_angular_8_project_using_Angular_CLI-kSXkW1hF0KU.mp4 _13_-...
-2
votes
1answer
41 views

How can I figure out which is my file manager system? [duplicate]

Is there any command I can use to understand which is the file manager installed in a machine? For instance, I'm using Linux Mint and I can use the command nemo. Now I'm connected to another machine ...
1
vote
1answer
18 views

Mass renaming files that have patern sql_^d^_migration.sql

I have the following list of files on an Ubuntu system: sql_1_migration.sql sql_2_migration.sql sql_3_migration.sql ... sql_100_migration.sql sql_1000_migration.sql ... And I need to rename it ...
0
votes
1answer
115 views

Git - handle symlink as if it was a file

Is there a way to make git handle a symlink as if it was a file. If I just normally add a symlink like git add symlink, git just stores/controlls the path to the file, not the linked file. Is it ...
0
votes
1answer
31 views

copying a symlink to a target file using cp -t

I have a symlink to a file on my Ubuntu system, and I need to copy the original file to a different directory and have a new name there. I am able to copy it to a different directory using readlink -...
3
votes
2answers
187 views

How to rename files with same name as parent folder

I have a folder called movies on my Ubuntu, which contains many subfolders. Each subfolder contains 1 mp4 file and may contain other files (jpg, srt). Each subfolder has the same title format: My ...
1
vote
0answers
41 views

Git - extract subfolders of repository into new repositories

I have a folder structure like this, with all folders and files within one git repository: ├── folder-01 │   └── script.sh ├── folder-02 │   └── script.sh ├── folder-03 │   └── script.sh ├── folder-...
0
votes
0answers
27 views

Store photo thumbnails on same drive

I'm using external drives and network storages for managing photos across multiple machines. Previewing them in the file browser (e.g. Thunar) is crucial for that. Furthermore, many of them are RAW ...
4
votes
2answers
554 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
62 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
36 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 ...
1
vote
1answer
199 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
18 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 ...
2
votes
1answer
229 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 ...
4
votes
4answers
3k 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 ...
9
votes
1answer
11k 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
1k 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
509 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
44 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
1k 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
838 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
148 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
169 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
20k 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
48 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
1k 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
841 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
10k 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
51 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
7k 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
15k 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
11k 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
2k 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
286 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 ...
271
votes
8answers
436k 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 ...
7
votes
2answers
3k 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
193 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
906 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
44 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
882 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
7k 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, ...
8
votes
4answers
6k 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 ...
5
votes
2answers
7k 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
776 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
8k 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
14k 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', '...