ubuntu and unix stuff about directories and hidden files - linux

In no way do i think i'm an adequate unix administrator but i'm learning. I "cd" into a specific directory and it appears to be empty after i do a "ls". But when i "ll" it says this:
/integration/import$ ll
total 184
What is this total 184? And how do i see these text files. I've never seen anything like this before. super confusing.
My co-worker had originally said this: in the imports folder find the text file containing this order and move it out of the folder/queue.

The below should list the hidden files as well. Usually, hidden files are the one starting with a dot. e.g. .mail or so.
ls -latr /integration/import/

Related

Sublime Text "Find and Replace" doesn't work

Let's say I have this folder in a project: /xxx/yyy
If I look for a certain string inside folder /yyy, Sublime will show me the results, even if it has found it within a file inside a subfolder of /xxx/yyy, let's say, /xxx/yyy/zzz/whatever.cshtml (that means it's searching recursively)
BUT, If I look for the same string inside the folder /xxx (the parent folder), nothing happens and I get no results.
Why? Does it have a limit for searching recursively? Maybe it can't handle too many files?
OK, I realised now that it works, it's just too fricking slow. But the project is quite huge plus it's accessing files on another computer and Sublime Text for some reason doesn't give proper feedback about the search (e.g. takes +- a minute to show the message "Searching 38415 files for xxxx")

Linux directory starting with dot

Is there anything special about directories which start with a dot . in Linux (Ubuntu), such as ~/.vim?
Thanks.
Files and directories whose names begin with a dot (.) by default are not displayed in directory listings by the standard command ls. Therefore, they are traditionally used to store settings, preferences, etc.. Directory ~/.vim in particular surely contains personal preferences and settings for the text editor vim.
There are also two special directory names in this class: the directory named simply . is an alias for the same directory in which it appears (a self reference), and the directory named .. refers to the parent directory of ..
Many graphical file browsers ignore the convention of hiding file names beginning with a ., so it is not necessarily correct any longer to call these files "hidden". Nevertheless, that terminology persists.
In UNIX-like environments, a filename preceded by a dot indicates a hidden file. It's mainly a mechanism to decrease clutter in directory listings. You can get a listing of hidden files by passing the -a parameter to ls
Those are hidden. You'd need to apply extra effort to see them.

Is it Possible to Delete "C:\cygwin64\usr\share\" Directory, to Decrease The Cygwin Library Size?

I've the Cygwin Packages Library installed om my system (Win7- x64) at location C:\Cygwin64\ .
That directory contains over 185.000 Files ! and its size passed the 5GB this week, Knowing that the packages source directory isn't included .
Now, I want to decrease that size, and of-course I'm going to uninstall some of my packages that I don't need anymore. But first I want to ask about the ability of deleting a specific directory that located in: C:\cygwin64\usr\share
(Please, forgive my ignorant, if my question is silly)
While I was trying to figure out the cause of that large files number, I noticed that, this directory specifically, has over than 90.000 File !!
I don't Know what is that directory used for, but would someone please tell me if I can Delete that folder safely, without affecting on the installed packages? - Thanks :)
I cannot speak for the entirety of the folder, but
awk uses that folder for
include files, which I would miss
delete a column with awk or sed
awk - how to delete first column with field separator
how to remove the first two columns in a file using shell (awk, sed, whatever)

linux commands that read specific parts of files

I'm having some troubles with homework questions for an intro linux class I am taking. Two questions in particular are really throwing me for a loop. I don't know what commands to use to list off specific parts of specific lines all in one command. This is the first time I've used linux and none of it was covered in lecture. Here are a few of the questions. I don't want the answers, just somewhere to start with the commands.
(1 command : ½ pt) You should be in your home directory.
Create a file named summer-school in your home directory that contains the file names and lines (the data, not the line numbers) in those files where students scored less than ten out of a hundred.
The files look like this:
mary;:;79/100;st407
mary;:;51/100;m395
mary;:;71/100;cs541
mary;:;75/100;ph535
mary;:;77/100;ws420
mary;:;97/100;c392
mary;:;79/100;st638
mary;:;82/100;ar523
(2 commands : 1 pt) You should be in the ~cs155/pub/hw2Files/ directory.
(Do not add this change of directory command to your list of commands)
Create a file named classes in your home directory with a list of all the classes taken by anyone.
Uses the same type of files.
Thanks for the help

Append text file with custom footer

Good day,
I am a CNC program not a computer programer. I am using CAM software to make cutting programs for our CNC router. The router is a bit old and can only take files 200-300 kb big. We are doing carvings that require 1-2 megs text files. I am using a program called GSplit ( http://www.gdgsoft.com/gsplit/ ) to divvy up the text file. It generates 10-25+ files with a custom header that our machine can read. All the files are great and it works, but I have to manually add the closing lines/footer to each file. The files that are created and used are normal .txt files but with a specific extension, .ANC.
Is there any way to automate this process of opening each individual file, scrolling to the end and copy/pasting the same 1-2 lines of code? The files are NAME[number].ANC in a contained folder. Would it be possible to just direct to a folder and say "add this 'text' to every file in this folder"?
Thanks for your time.
What OS are you using? Using Unix you can do a simple script on command line. If you are in the directory with the specific files simply execute:
for file in *; do echo "APPEND THIS" >> $file; done
If you are running Windows you should be able to do the same using cygwin (probably you could also use the power shell, but I don't know anything about the that)
I found a program Notepad++ (apparently the last person to find it...). USed the find/replace files option. A regular expression(note sure exactly what these are but I'm sure you guys do) "\s+\z" as to what to look for. It finds the last space or whatever at the end of all the files and then adds the code I need. Easy, free, and I don't need to write any computer code. Thanks for the attempt to help me Dirkk! :)

Resources