Skip to main content

All Questions

Tagged with
0 votes
1 answer
77 views

How can I create a file named "\?$*'ChouMi'*$?\"?

I need to create a file with this exact name "\?$*'ChouMi'*$?\" so that ls would show it as: $ ls | cat -e "\?$*'ChouMi'*$?\"$ $
prince royce's user avatar
0 votes
2 answers
360 views

Converting multiline to single line in a file looses double quotes

Here is my sample file cat test.txt "IND WEB", "Speed Web (Internal webserver)", "Web Bill", I tried the below two solutions to convert multiline to single line however ...
Ashar's user avatar
  • 511
3 votes
0 answers
295 views

I can see but cannot delete a file [closed]

I am running Linux Mint.I tried to copy a file with the file manager. It looked like it hung. I can see the file in the directory with ls -l: -rwxr-xr-x 1 mike domain^users 20 Mar 1 08:57 'output (...
mshepard's user avatar
0 votes
1 answer
276 views

ls -l seems to give one concatenation of the filenames found in a directory

I want to write a shellscript to convert all .ogg files in a directory to .mp3 files. The filenames contain spaces, so I use a lot of double quotes in the sequenco of commands. The command I use is ...
Jogchum's user avatar
0 votes
2 answers
2k views

Find size of file names with space and hyphen | pass file names containing space and hyphen to "du" [duplicate]

I have a file, which contains the name of some files. I want to find the total size of files in the list. #cat filelist /tmp-directory/connector_db_ connector_db /tmp-directory/connector_db -...
Midhun Jose's user avatar
1 vote
2 answers
1k views

Trying to use awk and the date command at the same time

I'm trying to use ls -l and filter only the files that were lastly modified in the current month. I'm running: ls -l | awk '{if($6 == date +%b) print$0; and get a syntax error. I've been looking ...
asaf92's user avatar
  • 292
1 vote
1 answer
1k views

How do I rename files that have '|' in them?

I am using Fedora 24. I have tried many different ways to do this. I've tried it under a Windows VM with the folder in question as a shared folder. I've tried using the 'rename' command. I've ...
Risshuu's user avatar
  • 19
1 vote
2 answers
10k views

Remove file with pound signs around it [duplicate]

I am using SSH to another terminal with very limited disk space. upon typing ls I see a file called #korpus.txt#. I suspect this file is an emacs buffer, but upon running emacs and trying to kill it ...
Sahand's user avatar
  • 111
0 votes
0 answers
358 views

swap strings of text inside vim using regex

I am working with a file where I need to swap "string A" and "String B's" locations simultaneously with a regex inside the vim. Here is an example line of code: succ_1st=`grep 'resulted in successful ...
user53029's user avatar
  • 2,843
2 votes
3 answers
829 views

Duplicate a file with random probability

I have a directly full of images and I am trying to put together a script/command that will randomly copy (with some probability) the image to a location with a random name at that destination (...
Christian Bongiorno's user avatar
2 votes
1 answer
180 views

Why does copying from a script screw with my files?

I am at a loss here, trying to find out the reason why a shell script that is basically copying a couple of files and directories from one place to another will result in the content of two of the ...
Oliver N.'s user avatar
5 votes
2 answers
46k views

Creating an empty file having a variable name in a script

I need to create an empty file using a shell script. The filename will be determined by examining all the files in a directory matching a pattern, say TEST.*, and appending _END to it so that the new ...
Abhishek Anand's user avatar