My bashrc file is listed like this when viewed in the file explorer:
,bashrc
I believe the filename should be formatted like this:
.bashrc
Will the comma affect how the program runs?
Is it ok to replace the comma with a period?
From this answer:
.bashrc is a shell script that Bash runs whenever it is started
interactively.
The .bashrc file must start with a period, not a comma, as it's a "hidden" file.
From wikipedia regarding hidden files:
In computing, a hidden folder (sometimes hidden directory) or hidden
file is a folder or file which filesystem utilities do not display by
default when showing a directory listing. They are commonly used for
storing user preferences or preserving the state of a utility, and are
frequently created implicitly by using various utilities.
Before renaming the file (replacing the comma with a period) you should first read it's contents and make sure that there is nothing potentially harmful there.
Someone could have potentially changed the period to a comma to ensure that the file isn't run while making risky or temporary changes.
Related
fzf --preview 'cat {}' gives me a two-pane terminal window of (left) a fzf fuzzy search for files and (right) a preview of said files.
When called, it starts out showing me /Users/tomnorway/Downloads, regardless of my current directory. I'd like to write a command that only finds files/folders within my current directory (recursively). Having read through man fzf to the best of my ability, I find no way to specify that. Does anyone have any advice?
From you response in the comments, given that the output of echo $FZF_DEFAULT_COMMAND is:
fd . /Users/tomnorway
You should go into your ~/.bashrc and replace the line:
export FZF_DEFAULT_COMMAND='fd . /Users/tomnorway'
with:
export FZF_DEFAULT_COMMAND='fd --type f'
Bonus
I also have an answer for if you want fzf to search a dedicated shortlist of
directories (e.g. Docs, Downloads, Pics, Vids, Admin, MyDir... etc.) regardless
of where you are in the filesystem
(https://stackoverflow.com/a/67019648/14467607). I like this because it
effectively means I can find any file at any time (but without cluttering the
fzf list with thousands of random files from various installations in my home
directory).
I am attempting to upload a .cys file to a journal website as part of a submission. Although they accept all file types, when I try to upload the .cys file, the name exceeds the 64-character limit, apparently due to some hidden characters in the name. Is there anyway to see the hidden characters in the file name and/or change them so the filename is less than 64 characters?
You should be able to simply rename the .cys file, however, they might be attempting to unzip it automatically (a .cys file is actually just a zip archive of everything in a Cytoscape session), in which case, they might be having problems with some of the filenames inside of the .cys file, which can't be renamed. You'll need to ask the journal about that.
-- scooter
Is it possible to manipulate the content of an MS Word file contained inside a .zip file, without extracting it?
I have 2,000 zip files containing Word files. I need to modify the same field in each of the 2,000 zipped MS Word files. Is this possible without extracting the file first?
Yes it is possible, but the difference is semantics. When I do this, with single documents, I COPY (not extract) the xml file from the zip container, edit as required, and then OVERWRITE back into the zip container.
I've also tried to edit the file from within the zip file, but it can't be saved directly (at least not the way I have tried) - so (for example in NotePad++) file SaveAs would be required...
I wanted to minify my JavaScript files using PhpStorm's file watcher but I can't get it working the way I would like it to.
I have installed uglify-js. In the file watcher I tried the following:
Arguments: $FileName$ -o $FileDir$.min.js --style compressed
Output paths to refresh: $FileDir$.min.js
The problem is that there is just 1 file being minified each time not all in one.
The other problem is that I would like to output a sourcemap but I don't know how to do this nor where to put it (arguments or output paths).
I hope someone could help me with these settings.
Few notes on File Watchers:
File watchers were designed primarily to perform some external actions on file on save.
File watcher gets called for each modified file.
If you want to process multiple files in one go (for example: merge 2+ files into 1) using File Watcher then you need to hard code all participating files (as opposed to using current file macro $FileName$ for that), unless, of course, uglify supports file masks (e.g. /path/to/folder/*.js).
If you modify 2 files from the target list then File Watcher will be called for each of them so even with hard coded file names it will be performed twice (same job done twice).
Considering the above I suggest using Grunt or Gulp task for that instead -- they're more suitable for such requirements.
P.S.
If you wish you could actually use such grunt/gulp task inside File Watcher (same as calling it in terminal/console manually) but because of point #3 above the better solution would be using Grunt's/Gulp's watch module/functionality if you need automatic execution of task.
I've been trying to open this data: http://ec.europa.eu/eurostat/estat-navtree-portlet-prod/BulkDownloadListing?sort=1&file=data%2Fdemo_gind.tsv.gz. I've already unzipped it and get the tsv file, but when I opened it in gedit, it looks like a binary file. Could anybody help me to open this file?
The file is correctly formatted even if not so readable for human beings.
TSV is a file extension for a tab-delimited file used with spreadsheet
software. TSV stands for Tab Separated Values. TSV files are used for
raw data and can be imported into and exported from spreadsheet
software. TSV files are essentially text files, and the raw data can
be viewed by text editors, though they are often used when moving raw
data between spreadsheets.
You can import it inside Excel or Open Office. Otherwise you may convert it by using online service (example google sheets).
Once you've unarchived the original .gz file there are two more steps required to view the data, as noted on Eurostat's website.
TSV files may be imported into Excel by (1) Saving on hard disk with
the suffix .tsv and (2) unzipping and (3) saving the table(s) as Text
(*.txt).
As per user74158's comment, decompress/unzip the tsv file. This can
likely be done with many different programs, I used 7zip and it
worked for me. On windows 7 I did this by right clicking, hovering
over 7zip, selecting extract files, tell 7zip where you'd like to
extract the files too and press OK.
Next go to the file, and change the .tsv file extension to .txt. Answer yes, you're sure you want to change the file extension and then you should be able to read the data.