1
vote
1answer
55 views

Linux Bash Shell - File globbing specific range?

I have a bunch of files in a folder: spreadsheet700.xls spreadsheet800.xls spreadsheet850.xls spreadsheet1005.xls spreadsheet2400.xls how can I use file globbing to select files that numbers end in ...
2
votes
1answer
41 views

Hex of filesize

I am following a tutorial on few kernel dev. I encountered an operation where I have to use dd like dd ... if=PBL.bin of=... count=block_number The block_number variable is defined to be as The ...
1
vote
4answers
98 views

How to move only files with other equal filename but different extension in the folder

I have a lot of folders, some with mp3 files only, others with m4a files only, other with files of both extensions. I need to identify which folders have files in both extensions, then move the mp3 ...
1
vote
2answers
926 views

Non-ISO extended-ASCII text

when i tried to know the encoding of the file all.txt using $ file all.txt it shows this message all.txt: Non-ISO extended-ASCII text, with very long lines what is the kind of this encoding ...
0
votes
1answer
22 views

Nano usablely open second file

Is it possible to open second file into Nano text editor not by browsing files in program interface (it's not so usable because you can't do nothing like search etc in it) but in command line or in mc ...
0
votes
2answers
67 views

What does the * mean next to a filename in the ouput of the command ll? [duplicate]

I have a doubt related the output of ll command. When, in my shell, I execute the ll command I obtain this output: -rwxrwxr-x 1 andrea andrea 104215 ott 15 15:56 atmosfs* Why I have the * next to ...
4
votes
2answers
202 views

Linux command line / Move files filtered by lexicographic order

I have some files in a directory that are named IMG_0001.jpg ... IMG_9999.jpg. I want to move to another directory the files that lexicographically have a name greater than IMG_9431.jpg How can I do ...
9
votes
2answers
651 views

Shrinking file size under Linux

I want to shrink a file's size by brute-force, that is, I don't care about the rest, I just want to cut the file, say by half, and discard the rest. The first thing that comes to mind is Perl's ...
0
votes
2answers
381 views

Using a file input as stdin for a shell script does not work

I have the following script code: test.sh echo "BEGIN" while read CMD <&1; do [ -z "$CMD" ] && continue case "$CMD" in start) echo "get_start" ;; ...
1
vote
2answers
577 views

Unix moving/removing files from subdirectories

if there are several subdirectories in the current working directory, i would like to move only specific filetypes or possibly all the contents of those directories, to the working directory. and ...
3
votes
3answers
55 views

Show Which Remote File is Writing My File

I know it sounds funny. I wrote a shell script and executed on a remote machine to ssh back to my local machine to write some files. I executed the script on various remote machines and I can't ...
2
votes
1answer
154 views

Copy all files in a folder which have the same name as files in a separate folder

Let me explain: I am going through a huge icon set, and choosing the icons I like. I have chosen maybe 250 out of 3000 icons. The way the icons are split up are like this: Icons -> 16x16 ...
101
votes
18answers
7k views

What's the quickest way to count the number of each character in a file?

I want to count the A's T's C's G's N's and "-" characters in a file, or every letter if needed, is there a quick Unix command to do this?
0
votes
1answer
532 views

how to convert line-delimited txt file into a spreadsheet file as tsv or xls

I have a huge amount of phone numbers (for example), one for each line in .txt file. 202898990 909090090 909090900 ... I want to put each number in a a cell (phone numbers in the same column). I ...
0
votes
2answers
289 views

Search for exe file within a condition

I want to search for all .exe files greater than 200 kB or smaller than 120 kB in the current folder and its subfolders. Then I want to move them to another folder called "folder" and execute in this ...
0
votes
2answers
3k views

Cutting and moving files using the Linux terminal

What is the command I can use to cut and then move a file from one location to another from a Linux terminal? Is there any website that lists all the commands for a Linux terminal?
0
votes
5answers
297 views

What is the shortest most readable way to print the n'th line of a file?

Its about Unix and Linux. Yes, there are many solutions to that, e.g. see http://mywiki.wooledge.org/BashFAQ/011. Some of them are fast as hell (not reading the whole file) and some are slow but ...
5
votes
5answers
5k views

sorting files by size in a dir

how can I display the files in a unix directory sorted by their human readable size, going from largest to smallest? I tried: du -h | sort -V -k 1 but it does not seem to work. thanks
1
vote
1answer
414 views

mv - move dir with destination-dir having the same subdirs as source-dir

In FreeBSD (I suppose it works like Linux et al in this regard), I'd like to move src_parent/mydir to dst_parent/mydir. dst_parent/mydir already exists, and it contains some subdirs that's also ...
0
votes
1answer
379 views

Using the Linux split command to create N Files

I need to split files into guaranteed number of buckets. The size do not have to be equal. Here is my logic count = wc -l filename split_count = (count)/4 split -l split_count filename core_ ...
3
votes
1answer
566 views

Windows 7 Primary Folder Icon File?

In Windows XP and earlier, when changing a folder's icon, you can select system32\shell32.dll for a wide selection of built-in windows icons that include most folder types. In Windows 7, you can ...
2
votes
4answers
652 views

Linux shellscript combine all files without for loop

I have hundreds of files in one directory, is there a simple command or pipes of command I can use to append them together? I don't want to use any loops.
1
vote
3answers
478 views

Easiest way to automatically copy files between computers

I am trying to write a script which will essentially copy and file in a certain folder to a folder on another computer. My first thought was SCP, but I don't know if I can automate SCP by adding a ...
40
votes
3answers
63k views

How to make new file permission inherit from the parent directory?

I have a directory called data. Then I am running a script under the user id 'robot'. robot writes to the data directory and update files inside. The idea is data is open for both me and robot to ...
1
vote
4answers
720 views

What do .# file names mean in Linux?

This is probably trivial, but I'm quite new to Linux and I was unable to find any info online. In a folder, I can execute the command find . -regex '.*py' and get the following result: ...
9
votes
8answers
2k views

Mass renaming, *nix version

I was looking for a way to rename a huge number of similarly-named files, much like this one (a Windows-related question) except that I'm using *nix (Ubuntu and FreeBSD, separately). Just to sum up, ...