filenames's questions - English 1answer

764 filenames questions.

I have a hdsentinel executable script, and when I type ./hdsentinel On the terminal I get info about my HDD health. When I type: ./hdsentinel >hd.log I get all that info in the hd.log file. ...

I have a directory that has a large number of files. These files are named according to the following system: "Var1_X_Var2_Y_Var3_Z_data_N.txt" Where X, Y, and Z are many different numbers, and N ...

I remove some files using trash-cli: $ pwd /tmp/test $ sudo trash mfile $ Then I look for where the deleted file is stored: $ sudo ls /.Trash/0/ -la total 16 drwx------ 4 root root 4096 May 19 16:...

I have two USB devices (rs232 to USB) connected.They have the same vendor's ID.During the boot they're associated randomly to /dev/ttyUSB0 and to /dev/ttyUSB1.Is there a way to associate each device ...

I found a command rename.ul on my Ubuntu machine. It comes from util-linux package. It is odd for me because I rarely see executables with extension. In addition, it seems unnecessary because the ...

I want to remove files that have not the string '999' (without the '') in their name. I have tried: grep -vlr 999 . | xargs -0 rm -f -- find . -print0 | grep --null-data -v 999 | xargs -0 rm -- But ...

Is it true that --link-dest=DIR of rsync only take an absolute pathname for DIR, and relative pathname for DIR doesn't work? When I run rsync -a --delete --link-dest=dest my\ dir dest2/ rsync -a --...

I have file called -l in my directory now I tried to do for i in *; do stat -c "%s %n" "$i"; done it lists all files with sizes but in the middle of the output there is something like 395 koko.pub ...

Although one can easily make an executable file named ./42 or even ./カラオケ, I find no common packages that include letter-free commands. On Ubuntu, for example, apt-file find . | grep -i -e '/[^a-z/_\-...

I have thousands of files with various prefixes, and those prefixes are grouped in a csv list. Now I want to move all of them to their folder according to their list. For instance: file A1B1C1_{...}....

Let's say I have a file with a unique name (e.g.Screenshot20180509143013.png) that I wish to copy to /media/SD256. The file /media/drive1/Users/name/Pictures/Screenshots/Screenshot20180509143013.png ...

I've just encounter the following question in Unix Programming Environment, the Kernighan and Pike's classic book on Unix (I found the below text on p. 79 of year 1984 edition, ISBN:0-13-937699-2): ...

I would like to execute a .blend file via terminal in a directory where only one .blend file is located. I would like to start this file without knowing the exact file name. If I knew the filename I ...

I'm currently writing a bash script that uses inotifywait to perform certain actions on a user-supplied list of files and directories. It has come to my attention that unlike a lot of shell tools, ...

This is a list of files I have: $ ls -rt1 First Day in Tokyo.mp4 First Day in Seoul.mp4 Second Day in Beijing.mp4 Third Day in Bangcock!.mp4 Last Day in Singapore.mp4 $ What I want is: 01. First ...

Is the slash (/) really part of the name of the Linux root directory? Or is it just a symbol for it? What about /etc and so on?

Is it possible to use find to only return a result is 3 file names are present in that directory? of course at the end we can use wc -l to tally them up... but starting with some sort of a project ...

I have many tar.gz files in a folder on my Linux machine and also text file with tar.gz file names and matching sample names. Current_directory |_______TDF.tar.gz |_______DFG.tar.gz ...

I have tar.gz files like below in a directory df: A.tar.gz B.tar.gz C.tar.gz D.tar.gz E.tar.gz F.tar.gz G.tar.gz I also have text file move.txt with following columns information: ID Status ...

This question is inspired by Why is using a shell loop to process text considered bad practice ? I see these constructs for file in `find . -type f -name ...`; do smth with ${file}; done and for ...

In a particular path, I have a few directories (date as filename), for example: if the directory name is like 20180423 it should be listed if the directory name is like 20180423-backup or ...

I have an application which correctly escapes slashes ("/) in file names to avoid path traversal attacks. The secret file has this path: /tmp/secret.txt I want to access this file by uploading a ...

On my Linux Mint 18.3 installation I had troubles with my locale setting which caused the generation of a folder that has invalid encoding in its name. I would now like to delete said folder but I ...

For example, I can do the following touch a or touch ./a Then when I do ls I can view both, so what exactly is the ./ for?

Why I am seeing two files (directories) in the same directory with same name ‘storage’? The inode numbers are different. root@OpenWrt:/# fsck.ext4 -p /dev/sda1 /dev/sda1: clean, 2213/979200 files, ...

In linux only two characters are forbidden in filenames "slash" and "null character". So every character with special meaning in every script language should be escaped, BUT every escape sequence is ...

APUE says Each process also has a root directory that is used for resolution of absolute pathnames. This root directory can be changed with the chroot function. I thought only ...

I'm trying to list all the hidden files in a directory, but not other directories, and I am trying to do this using only ls and grep. ls -a | egrep "^\." This is what I have so far, but the problem ...

I have just become responsible for a Linux system, and I am a Linux newbie. I have been asked by the data owner to copy a specific folder (and its large amount of subfolders and files) via FTPS to our ...

I have lots of files 101s18-exam02--100-booklets.pdf MATH232 Exam 01 99 booklets.pdf 35BOOKLETS.pdf I want to write a command that extracts the number from each file occurring before the word "...

I want to parse the file name and assign a variable (code) based on it. I think I can use cut to get each values. But can we do it in one command? sample file name: 012345678_012345678-...

Here is my use case: the command line utility melt can accept a file name, with the extension .melt on the command line, and open it; as an example, this is a proper test_p.melt file: colour:blue out=...

I'm a novice linux user working on a MBP running El Capitan. I don't have access to a pure linux box. I have a bunch of XML files that are missing a filename callout line. I need to insert that line ...

For example I have a link http://www.abc.com/123/def/ghi/jkl.mno. I want to download it using wget or curl and get the name of output file as def_ghi_jkl.mno, where the part def_ghi is taken from the ...

I've some files and directories within the directory /var/foo/bar/baz. Now, I want to move all of them up into /var/foo/bar, and get rid of baz. Easy, right? cd /var/foo/bar mv baz/* . rmdir baz (I'...

I need a file (preferably a .list file) which contains the absolute path of every file in a directory. Example dir1: file1.txt file2.txt file3.txt listOfFiles.list: /Users/haddad/dir1/file1.txt /...

I have files in a directory (/home/user/example) that I need to verify and match. Each file has a control and data file. I want to check if for each file there is a corresponding file of the other. ...

Given list of directories, e.g. dirs="Larry Curly Moe" compiler vendor, e.g. -gcc-M.N.0 the goal is to sweep through each directory and truncate all file names like so: intel-mkl/2018.1.163-gcc-...

I have a bash script which I'm trying to get to replace dots in filenames and replace them with underscores, leaving the extension intact (I'm on Centos 6 btw). As you can see from the output below, ...

I've a set of files named in the following manner: _9978967868768763ghjgj7598983678hjva_week1-6.pdf _78637832bdsjh275637bkkaww786b_week12-32.pdf 8786767867868978713bkwkhjhkjqw_week1-622.pdf ...

I have these files in a directory: mmm.1 mmm.2 mmm.3 . . . . . i want to rename them as: mmm.31 mmm.32 mmm.33 . . . Just adding the number '30' to the trailing number in each file name.

I want to zip a file called filename.txt This is quite easily done with: zip filename filename.txt This will create a zipped file called filename.zip However I want to keep the file extension in ...

I'm in the midst of learning about ACL's for CentOS/Red Hat 6; when I run getfacl using an absolute path, I get among the output: getfacl: Removing leading '/' from absolute path names Why does ...

I have a large number of files which I would like to rename. Here is an example of how I would like to change the file names: From: PD5 grey nice display 1.jpg To: pd5-grey-nice-display-showcase-1....

I have a lot of folders with files ending with "-105x135.jpg", "-410x410.jpg" etc., "780-105x135.jpg" and "candyswing-2-klein-ohrringe-schale-038-135x160.jpg" for example which i need to find and ...

I am able to open on file at a time using cat -- -file00 but I want to open multiple files at once. Tried using find, can't figure it out. find ./ -name '*.txt' exec cat {} \; find ./ -name '*.txt' ...

I'm working on a python script that passes file locations to an scp subprocess. That's all fine, but I'm in a situation where I may end up concatenating a path with a filename such that there's a ...

I want to call a python script script.py from the terminal by simply typing script. Is this possible? If so, how? I know I can avoid typing python script.py by adding #!/usr/bin/env python to the top ...

For various reasons I decided to use RAR archive to store some data, instead compressed tar. Happy with decision, except for one thing: I can't find a way to store files sorted. Order of files is ...

I have a directory that contains numerous files. Moreover, I forget exact file name. So, when I want to find a file I don't find it. If there is any tool that use soundex algorithm for searching ...

Related tags

Hot questions

Language

Popular Tags